Bug 1264440 - npm can't install usable npm@3
Summary: npm can't install usable npm@3
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: npm
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: T.C. Hollingsworth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-18 13:20 UTC by Jon Dufresne
Modified: 2015-11-14 18:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-14 18:41:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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