Wrong NPM version with Node 5.0/5.1

nodejs
known-issue

#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
npm ERR! code EBADPLATFORM

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

dependencies:
  pre:
    - 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
#2

#3

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.


#4

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


#5

Is this resolved yet?


#6

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


#7

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?


#8

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


#9

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

Maybe @levlaz can help?


#10

Any updates about the issue?

Thanks


#11

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

cc @frank @levlaz


#12

Hello,

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)
v5.0.0
3.3.6

$ nvm use 5.1.0; node --version; npm --version
Now using node v5.1.0 (npm v3.3.12)
v5.1.0
3.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).


#13

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