[英]Why is npm install not installing packages into /node_modules folder?
[英]npm install not installing packages
例如,我尝试通过运行npm install discord.js
来安装要安装的软件包,但它没有安装。 下面是终端。
npm ERR! code ECONNRESET
npm ERR! syscall read
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/discord.js/-/discord.js-13.1.0.tgz 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
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
这是在等待 5-10 分钟之后。 我几乎做了所有能想到的事情。 任何帮助,将不胜感激。 谢谢! XRift_0
编辑
禁用卡巴斯基后,它起作用了。 如何让它在启用卡巴斯基的情况下工作?
它正在尝试使用您 PC 中设置的代理配置。
检查位于 C:\Users\yourprofile.npmrc 的 .npmrc 文件。
相应地添加或删除代理配置或删除.npmrc
proxy=http://proxyserveripordn:proxyport/
https-proxy=http://proxyserveripordns:proxyport
http-proxy=http://proxyusername:proxyuserpassword@proxyserveripordns:proxyport
严格-ssl=false
尝试:
npm config set registry http://registry.npmjs.org/
因此npm
请求http url而不是https 。
在此之后,尝试相同的npm install discord.js
命令。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.