Domestic access the Internet is very slow, you can not even visit! You know everything, are helpless!
When you install Node npm comes with default address is: http://registry.npmjs.org , access is very slow! All right, ye have replaced the country! How to change?
1. config command
npm config set registry http://registry.cnpmjs.org npm info underscore
(If the above command will be configured correctly string response)
2. specify the command line
npm --registry http://registry.cnpmjs.org info underscore
3. Edit node_modules \ npm.npmrc add the following content
registry = http://registry.cnpmjs.org
If the above npm
address does not work, you can try Taobao npm
, very stable:
address:https://registry.npm.taobao.org
More Solutions: https: //www.uedbox.com/post/8151/
https://npm.taobao.org/
https://github.com/cnpm/cnpm
https://github.com/qiu8310/smart-npm/
https://github.com/Pana/nrm
https://segmentfault.com/a/1190000002642514