Bug 1264440 - npm can't install usable npm@3
npm can't install usable npm@3
Product: Fedora
Classification: Fedora
Component: npm (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: T.C. Hollingsworth
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-09-18 09:20 EDT by Jon Dufresne
Modified: 2015-11-14 13:41 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-14 13:41:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jon Dufresne 2015-09-18 09:20:05 EDT
Description of problem:

The npm project recommends using a newer version of their software. I achieve this in my projects by first using Fedora's npm to install the latest npm local to the project, then using the project's npm to install project dependencies. Ideally, this would look like:

$ npm install npm
$ node_modules/.bin/npm install

However, Fedora's npm can't install the latest version npm in a usable state. Using the resulting npm results in an error "Error: Cannot find module 'are-we-there-yet'". See full output below.

According to the npm developers, Fedora shouldn't be packaging and shipping an npm version that is so old. According to them <https://github.com/npm/npm/issues/9644>:

That version of npm is so old it can't reliably upgrade all the way to npm@3. I agree that the behavior isn't ideal, but there's not a lot we can do about it now, as 1.3 barely works with the current registry architecture and is full of race conditions (and is no longer supported by the CLI team, for these and many other reasons).

$ npm install npm
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-3.3.3.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-3.3.3.tgz
npm@3.3.3 node_modules/npm
$ node_modules/.bin/npm --version

    throw err;
Error: Cannot find module 'are-we-there-yet'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/jon/node_modules/npm/node_modules/npmlog/log.js:2:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
Comment 1 Jon Dufresne 2015-11-14 13:41:19 EST
No longer see this error.

Note You need to log in before you can comment on or make changes to this bug.