我该如何修复npm proxy erorr?

时间:2021-06-17 07:28:11

I want install a npm package.json file for manage gulp tasks and i did not set any proxy but i have this error :

我想安装一个npm package.json文件来管理gulp任务,我没有设置任何代理,但我有这个错误:

npm ERR! Linux 4.13.0-26-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v6.12.3
npm ERR! npm  v3.10.10
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 127.0.0.1:34663
npm ERR!     at Object.exports._errnoException (util.js:1020:11)
npm ERR!     at exports._exceptionWithHostPort (util.js:1043:20)
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
npm ERR!  { Error: connect ECONNREFUSED 127.0.0.1:34663
npm ERR!     at Object.exports._errnoException (util.js:1020:11)
npm ERR!     at exports._exceptionWithHostPort (util.js:1043:20)
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '127.0.0.1',
npm ERR!   port: 34663,
npm ERR!   parent: 'website' }
npm ERR! 
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

Consider, i set proxy null and registry but yet i have this problem. Thank you

考虑一下,我设置代理null和注册表,但我有这个问题。谢谢

1 个解决方案

#1


0  

EDITED: Set all proxy configuration to null, both http and https proxy

已编辑:将所有代理配置设置为null,http和https代理

npm config set proxy null
npm config set https-proxy null
npm config set http-proxy null

and also set the registry

并设置注册表

npm config set registry http://registry.npmjs.org/

Hope this helps you

希望这对你有所帮助

#1


0  

EDITED: Set all proxy configuration to null, both http and https proxy

已编辑:将所有代理配置设置为null,http和https代理

npm config set proxy null
npm config set https-proxy null
npm config set http-proxy null

and also set the registry

并设置注册表

npm config set registry http://registry.npmjs.org/

Hope this helps you

希望这对你有所帮助