尝试安装软件包时 Node.js ECONNREFUSED [英] Node.js ECONNREFUSED when trying to install packages

查看:69
本文介绍了尝试安装软件包时 Node.js ECONNREFUSED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm working the learnyounode tutorial to learn node.js. I'm getting an error any time I try install a package.

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

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

I also did npm config ls to see if there was anything out of the ordinary with my configuration but really I don't know what I'm looking for. Can someone help me figure out how to fix this error so that I can install packages.

; 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.

推荐答案

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

Set your NPM registry back to registry.npmjs.org:

npm set registry https://registry.npmjs.org

这篇关于尝试安装软件包时 Node.js ECONNREFUSED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆