This is on a Macbook
I execute sudo npm install -g npm
and get this following output:
/Users/myUser/.npm-packages/bin/npm -> /Users/myUser/.npm-packages/lib/node_modules/npm/bin/npm-cli.js npm@3.10.8 /Users/myUser/.npm-packages/lib/node_modules/npm
However, when I restart terminal and npm -v
, I still get 2.15.9
The nvm
tool is most commonly used for managing Node versions and upgrades. Follow the directions here for your platform: https://github.com/creationix/nvm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.