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
阅读 5.9k
3 个回答

试试配成淘宝镜像:

npm config set registry https://registry.npm.taobao.org

然后再重复你刚才出错的命令试试

试试cnpm把,比npm快多了。

切换镜像地址,或者使用nrm镜像管理器

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题