nodejs模块npm install error / gcm-node module发送错误

时间:2014-02-02 09:59:54

标签: node.js push npm

我的ubuntu12.0.4服务器, npm安装错误,请帮帮我


https://github.com/ToothlessGear/node-gcm


$npm install node-gcm


npm install node-gcm
npm WARN package.json dateformat@1.0.6-1.2.3 No repository field.
npm http GET http://registry.npmjs.org/node-gcm
npm http GET http://registry.npmjs.org/node-gcm
npm http GET http://registry.npmjs.org/node-gcm
npm ERR! network getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! System Linux 3.2.0-23-virtual
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "node-gcm"
npm ERR! cwd /home/Tonight
npm ERR! node -v v0.10.20
npm ERR! npm -v 1.3.11
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/Tonight/npm-debug.log
npm ERR! not ok code 0

node-gcm发送错误> GCM请求期间出现异常:错误:getaddrinfo ENOTFOUND

1 个答案:

答案 0 :(得分:1)

这可能是您与Internet连接的问题。您是否可以尝试安装其他模块,例如npm install express,并通过ping stackoverflow.com验证您已连接到互联网

您可能还想检查您是否正在使用最新版本的node和npm,如果可能的话,可能会重新安装,以防您的安装出现问题。

如果您需要设置代理this链接,请详细说明具有类似错误的人,并对如何解决该问题有很好的解释。

从上面的链接中你可以尝试:

npm config set proxy http://proxy.company.com:8080

npm config set https-proxy http://proxy.company.com:8080