Reputation: 1328
I try to upgrade the npm version used by Travis CI in the .travis.yml
config file :
language: node_js
node_js: 0.12
before_install: npm install -g npm@latest
But it change nothing when I look to the Travis job's logs :
node --version
v0.6.21-pre
npm --version
1.1.37
I also don't understand why the node version is 0.6 because I explicitly tell Travis to use the 0.12 version...
But my main problem is why the npm version is not updated. I have many No compatible version found
errors when installing the npm dependencies. (I have this exact same issue https://github.com/npm/npm/issues/7219).
What am I doing wrong ?
Upvotes: 4
Views: 1622
Reputation: 106698
You may need to use lists for node_js
and before_install
. For example:
language: node_js node_js: - 0.12 before_install: - npm install -g npm@latest
On an unrelated note though, v0.12 will no longer be supported after the end of this year, so unless you really need to use that version, you should consider upgrading to something like v6.x which is the current LTS release branch as of this writing.
Upvotes: 1