![](/img/trans.png)
[英]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.