尝试安装软件包时 Node.js ECONNREFUSED

Raw*_*lal 1 node.js npm

我正在使用 learnyounode 教程来学习 node.js。每次尝试安装软件包时都会出现错误。

npm ERR! Linux 4.2.0-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.1.1/bin/node" "/home/ubuntu/.nvm/versions/node/v4.1.1/bin/npm" "install" "through2-map" "--save"
npm ERR! node v4.1.1
npm ERR! npm  v3.7.5
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! syscall connect

npm ERR! Error: connect ECONNREFUSED 127.0.0.1:15443
npm ERR!     at Object.exports._errnoException (util.js:837:11)
npm ERR!     at exports._exceptionWithHostPort (util.js:860:20)
npm ERR!     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
npm ERR!  { [Error: connect ECONNREFUSED 127.0.0.1:15443]
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect',
npm ERR!   address: '127.0.0.1',
npm ERR!   port: 15443 }
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'

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/workspace/npm-debug.log
Run Code Online (Sandbox Code Playgroud)

我还执行了 npm config ls 以查看我的配置是否有任何异常,但实际上我不知道我在寻找什么。有人可以帮我弄清楚如何修复此错误,以便我可以安装软件包。

; cli configs
user-agent = "npm/3.7.5 node/v4.1.1 linux x64"

; userconfig /home/ubuntu/.config/how-to-npm/npmrc
//localhost:15443/:always-auth = false
//localhost:15443/:email = "rawledjuglal@gmail.com"
//localhost:15443/:username = "rawlejuglal"

; node bin location = /home/ubuntu/.nvm/versions/node/v4.1.1/bin/node
; cwd = /home/ubuntu/workspace
; HOME = /home/ubuntu
; "npm config ls -l" to show all defaults.
Run Code Online (Sandbox Code Playgroud)

Sté*_*ert 6

将您的 NPM 注册表设置回 registry.npmjs.org:

npm set registry https://registry.npmjs.org
Run Code Online (Sandbox Code Playgroud)