gpt4 book ai didi

node.js - npm 安装不起作用

转载 作者:IT老高 更新时间:2023-10-28 23:18:20 26 4
gpt4 key购买 nike

操作系统 Windows 7 64 位

当我使用 npm install gulp 时,npm 不起作用。

我很困惑....

错误代码:

npm ERR! Error: connect ECONNREFUSED
npm ERR! at errnoException (net.js:878:11)
npm ERR! at Object.afterConnect [as oncomplete] (net.js:869:19)
npm ERR! { [Error: connect ECONNREFUSED]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect' }
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! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "nodemailer"
npm ERR! cwd C:\Users\yy
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
npm ERR! syscall connect
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! stack Error: connect ECONNREFUSED
npm ERR! stack at errnoException (net.js:878:11)
npm ERR! stack at Object.afterConnect [as oncomplete] (net.js:869:19)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\yy\npm-debug.log
npm ERR! not ok code 0

提前致谢!

最佳答案

看起来你在代理后面。要绕过它,您必须像这样配置它:

npm config set proxy http://myproxyblabla:myport
npm config set https-proxy http://myproxyblabla:myport

https 的问题通过以下方式解决:

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

关于node.js - npm 安装不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24244684/

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