npm install报错

新手上路,请多包涵

npm install 报错图片描述

http://registry.npm.taobao.or...
$ npm install
npm WARN deprecated babel-preset-es2015@6.24.1: ???? Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated tween.js@16.6.0: This package has moved to @tweenjs/tween.js. Please update your dependencies.
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gul...
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to http://registry.npm.taobao.or... failed, reason: read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the

阅读 4.6k
2 个回答

npm install --registry=https://registry.npm.taobao.org/

建议去掉淘宝的镜像站。我发现淘宝的镜像站同步经常会有问题,安装的时候各种花式报错,还出现过sha1码不匹配的情况,而且现在官方仓库也不慢了,npm也增加了npm ci来安装package-lock.json定义的版本了,大大提高了依赖安装速度。

所以建议你去掉淘宝的镜像站即可解决问题。

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