简体   繁体   中英

npm -v still showing version 2.x.x after installing npm3

I am starting to use Angular 2, which requires npm 3.xx , so I installed it with npm install -g npm3 . The Angular 2 tutorials tell me to verify that I have npm 3.xx by running npm -v , however when I run that, it still says I have version 2.15.8 . It shows that I have version 3.10.7 if I run npm3 -v , but not if I run npm -v . Is this going to cause errors? Do I need to it to say I'm using version 3.xx when I run npm -v ? If so, what do I need to do?

EDIT: Node.js version: node -v reveals that I am using v4.4.7 (Angular2 requires something between 4.4.x - 5.xx , so I should be good here)
OS: I am currently using Windows 10 on a PC, but have had the same issue with my Mac.

使用此命令升级npm- npm install -g npm

Maybe this helps:

https://www.google.de/search?q=update+npm+windows

Updating npm with npm itself will store npm.cmd in ../appdata/roaming/ . To avoid conflicts with an older npm version you need to remove npm.cmd from C:\\Program Files\\nodejs\\npm.cmd

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM