gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 23:05:23 37 4
gpt4 key购买 nike

我正在学习 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

我还执行了 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.

最佳答案

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

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

关于尝试安装软件包时 Node.js ECONNREFUSED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35775058/

37 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com