npm install安装失败:npm install jquery npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network
npm install安装失败:npm install jquerynpm ERR! code ETIMEDOUTnpm ERR! errno ETIMEDOUTnpm ERR! network request to https://registry.npmjs.org/jquery failed, reason: connect ETIMEDOUT 104.16.25.35:443npm ERR
·
npm install安装失败:
npm install jquery
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/jquery failed, reason: connect ETIMEDOUT 104.16.25.35:443
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
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-07-13T03_28_47_121Z-debug.log
搜索说执行这两行即可,效果是清楚代理和缓存
npm config set proxy false
npm cache clean
我在执行第一行没问题,第二行就又报错如下:
npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.
npm ERR!
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-07-13T03_31_14_699Z-debug.log
又在度娘上搜索说是由于 npm 5 使用了新的包管理模式,所以在升级之后,请先清空一下本地缓存
npm cache clean --force
如果上边没办法解决问题,可以尝试下边的指令:
npm cache clear --force && npm install --no-shrinkwrap --update-binary
执行完之后在执行npm install安装想要的就没有任何问题了(我的问题解决)

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)