npm install的代理问题
我在windows的命令行里使用命令npm install jsdom想安裝jsdom時,遇到如下錯誤:
c:\Code\wechat\unittest>set http_proxy=
c:\Code\wechat\unittest>set https_proxy=
C:\Code\wechat\unittest>npm install jsdomnpm ERR! code ENOTFOUNDnpm ERR! errno ENOTFOUNDnpm ERR! network request to http://registry.npmjs.org/jsdom failed, reason: getacdrinfo ENOTFOUND proxy.sha.diablo.corp proxy.sha.diablo. corp:8080npm 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 thehpm ERR! network ‘proxy’ config is set properly. See: 'npm help config
開始我以為是cmd的代理在生效,使用命令set http_proxy=將其置空后仍然不工作,使用命令npm config list后才發現,是npm本身的代理在起作用。
打開npm的全局配置文件 .npmrc,
將代理相關的配置刪除即可。
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":總結
以上是生活随笔為你收集整理的npm install的代理问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 癸山丁向下卦(七运)
- 下一篇: 碧蓝航线埃塞克斯怎么样 埃塞克斯值得入手