Bug 1264440

Summary: npm can't install usable npm@3
Product: [Fedora] Fedora Reporter: Jon Dufresne <jon.dufresne>
Component: npmAssignee: T.C. Hollingsworth <tchollingsworth>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jamielinux, tchollingsworth
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-14 18:41:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jon Dufresne 2015-09-18 13:20:05 UTC
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 node_modules/npm
$ node_modules/.bin/npm --version

module.js:340
    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 18:41:19 UTC
No longer see this error.