Reputation: 7919
How could I change the node version that npm is using?
I have installed node 6.11.2
$ node -v
v6.11.2
but when I use npm is detecting node v4.2.6
$ npm info
npm ERR! Linux 4.4.0-93-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "info"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/html5-webpack-template
npm ERR! 404
npm ERR! 404 'html5-webpack-template' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! /home/workspace/standards-playground/src/main/webapp/npm-debug.log
Upvotes: 0
Views: 2967
Reputation: 46
First use the below command to list all version installed
nvm ls
After that use below command
nvm use `<version>`
You can follow the instructions of Node Version Manager (nvm) to install it.
Upvotes: 3