nodejs module npm install error / gcm-node module send err

纵饮孤独 提交于 2019-12-12 01:10:10

问题


my ubuntu12.0.4 server, npm install error, please help me


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 send error > Exception during GCM request: Error: getaddrinfo ENOTFOUND


回答1:


This could be a problem with your connection to the Internet. Can you try to install a different module like npm install express and also verify you are connected to the Internet with ping stackoverflow.com

You might also want to check that you are using recent versions of node and npm and even maybe reinstall if possible in case something is corrupted with your installation.

If you need to setup a proxy this link details someone with a similar error and has a good explanation of how to solve it.

From the link above you could try:

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

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



来源:https://stackoverflow.com/questions/21509252/nodejs-module-npm-install-error-gcm-node-module-send-err

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!