Article From:https://segmentfault.com/q/1010000011712610
Question:

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?

Answer 0:

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.

Answer 1:

Try cnpm

Answer 2:

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.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *