How to change NODE and NPM version
kodali@kodaliPC:~/SivaDocs/React/Examples/hello-react3$ node --version
v14.7.0
kodali@kodaliPC:~/SivaDocs/React/Examples/hello-react3$ npm -v
6.14.7
kodali@kodaliPC:~/SivaDocs/React/Examples/hello-react3$ nvm use 10.14.2
Now using node v10.14.2 (npm v6.4.1)
kodali@kodaliPC:~/SivaDocs/React/Examples/hello-react3$ npm -v
6.4.1
kodali@kodaliPC:~/SivaDocs/React/Examples/hello-react3$ node -v
v10.14.2
NOTE: If you close terminal, and open new terminal then if you run npm -v and node -v you will get default versions. Remember it. Again in that new terminal if you want to downgrade you have to use the command nvm use VERSION_NUMBER
https://www.tecmint.com/nvm-install-multiple-nodejs-versions-in-linux/
npx vs npm
https://www.geeksforgeeks.org/what-are-the-differences-between-npm-and-npx
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// install specific version of node
nvm install 6.9.2
// set default version of node
nvm alias default 6.9.2
// switch version of node
nvm use 6.9.1
// to list available remote versions of node (via nvm)
nvm ls-remote
To list available remote versions on Windows 10 you can type:
nvm list available
rajeshpv commented on 29 Jan 2020
nvm ls-remote | grep -i 'latest'
or all versions starting with v12
nvm ls-remote | grep -i 'v12'
// to list available remote versions of node (via nvm)
nvm ls-remote
https://www.sitepoint.com/quick-tip-multiple-versions-node-nvm/
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// To list available remote versions on Windows 10 you can type
nvm list available
// install a specific version of node
nvm install 6.9.2
// switch version of node
nvm use 6.9.1
Comments
Post a Comment