node.js Once installed successfully, both input node-v and npm-v can return version information, but the execution of the NPM install command will report an error. The following figure, why?
npmIt’s slower to visit in China, you know why.
It is recommended to use the following operations:
npm config set registry https://registry.npm.taobao.org/
It is not recommended to use cnpm, sometimes it may lead to a strange bug.
Because NPM is too slow in China, it is recommended to register cnpm command.
npm install -g cnpm –registry=https://registry.npm.taobao.org
After that, NPM can be replaced by cnpm.