Wrong NPM version with Node 5.0/5.1



The recent container image update includes Node v5.0.0 and v5.1.0. Unfortunately, it looks like we bundled the wrong version of NPM with these Node versions, which results in an error looking like this:

npm ERR! Linux 3.14.28-031428-generic
npm ERR! argv "/home/ubuntu/nvm/versions/node/v5.0.0/bin/node" "/home/ubuntu/nvm/versions/node/v5.0.0/bin/npm" "install"
npm ERR! node v5.0.0
npm ERR! npm  v2.13.5

You can fix this by adding something like this to your circle.yml:

    - npm install -g npm

This will install latest npm v3.x.y that works with Node v5.

We’ll fix this issue in the future container release.

Frequently getting npm 1.1.70 instead of correct installed version
Container Image Update 201511-01


I just went into this situation. This is indeed extremely misleading.
It would make sennse the npm version to match the one announced in the release list.


Is the latest version of NPM now included with the node 5.5.0 container?


Is this resolved yet?


installing npm with every build is kind of annoying, is there a way we can just have it always use 3?


I have to install npm v3 every build which adds an additional 15 seconds to the build time. :frowning:

Is there an ETA on fixing this @frank ? Is it a priority?


This is still a problem it seems. Please update us @frank!


It looks like Frank may not work at CircleCI any longer?

Maybe @levlaz can help?


Any updates about the issue?



Would love an update. This install adds 1:15 to every build.

cc @frank @levlaz



Sorry for the lack of response on this. This was indeed corrected on our 14.04 build image:

$ nvm use 5.0.0; node --version; npm --version
Now using node v5.0.0 (npm v3.3.6)

$ nvm use 5.1.0; node --version; npm --version
Now using node v5.1.0 (npm v3.3.12)

It is possible you are using our 12.04 build image, which we will not be updating due to 12.04 being EOL soon. To check which image your build is running on, expland the Start container step of one our your builds.

You can change the build image via the menu in Project settings > Build environment. You’ll need to trigger a new build by pushing a commit once you’ve made this change (just running a ‘rebuild’ will reuse the same build image).


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.