node.js - npm 使用出错
本文介绍了node.js - npm 使用出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
npm ERR! fetch failed https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
npm ERR! fetch failed https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
npm ERR! fetch failed https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
npm ERR! fetch failed https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
npm ERR! fetch failed https://registry.npmjs.org/signal-exit/-/signal-exit-2.1.2.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
npm ERR! fetch failed https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
npm ERR! fetch failed https://registry.npmjs.org/globule/-/globule-0.1.0.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
npm ERR! fetch failed https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.4.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
npm ERR! fetch failed https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz
npm WARN retry will retry, error on last attempt: Error: connect ETIMEDOUT
解决方案
试试配成淘宝镜像:
npm config set registry https://registry.npm.taobao.org
然后再重复你刚才出错的命令试试
这篇关于node.js - npm 使用出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文