gpt4 book ai didi

android - 通过 cmd nodejs [windows 7] 的 Phonegap 安装问题

转载 作者:行者123 更新时间:2023-11-29 14:50:30 25 4
gpt4 key购买 nike

我正在尝试使用 cmd 安装 phonegap“npm 安装-g phonegap”

但它没有安装并给我安装失败的消息我在下面粘贴了 cmd 消息

那么我如何设置 nodejs 可以用来连接到互联网并完成 phonegap 安装的代理设置(假设这就是问题所在)

我的系统配置是windows 7 64bit

C:\Windows\system32>npm install -g phonegap

npm http GET https://registry.npmjs.org/phonegap

npm ERR! Error: connect ECONNREFUSED

npm ERR! at errnoException (net.js:901:11)

npm ERR! at Object.afterConnect [as oncomplete] (net.js:892: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.1.7601

npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod

ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "phonegap"

npm ERR! cwd C:\Windows\system32

npm ERR! node -v v0.10.21

npm ERR! npm -v 1.3.11

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:901:11)

npm ERR! stack at Object.afterConnect [as oncomplete] (net.js:892:19)

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR! C:\Windows\system32\npm-debug.log

npm ERR! not ok code 0

最佳答案

解决了

只需设置

npm config set proxy http://usr:pwd@proxyname:port

npm config set https-proxy http://usr:pwd@proxyname:port

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

关于android - 通过 cmd nodejs [windows 7] 的 Phonegap 安装问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19656394/

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