【问题标题】:How can i fix npm proxy erorr?如何修复 npm 代理错误?
【发布时间】:2018-01-14 11:48:17
【问题描述】:

我想安装一个 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'

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

【问题讨论】:

    标签: node.js npm gulp npm-install


    【解决方案1】:

    已编辑:将所有代理配置设置为 nullhttphttps 代理

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

    并设置注册表

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

    希望对你有帮助

    【讨论】:

    • 我使用的是 ubuntu,但我没有任何代理 ip 和服务器。早上这很好,但现在有这个错误....
    猜你喜欢
    • 1970-01-01
    • 2020-09-18
    • 2019-02-22
    • 2017-10-20
    • 2016-07-19
    • 1970-01-01
    • 1970-01-01
    • 2018-10-09
    • 2020-07-24
    相关资源
    最近更新 更多