However, because of using the new-style dependencies in package.json, node-gcm will fail on node versions below 0.10.x because its dependencies can't be parsed. The fix would either be to use backwards-compatible dependency version strings or to update the engines requirement to ">= 0.10.0".
eg:
hloftis:~/test/node-gcm$ node --version
v0.8.28
hloftis:~/test/node-gcm$ cat package.json | grep gcm
"name": "node-gcm-test",
"node-gcm": "0.9.12"
hloftis:~/test/node-gcm$ npm install
npm WARN package.json node-gcm-test@0.0.0 No README.md file found!
npm http GET https://registry.npmjs.org/node-gcm/0.9.12
npm http 304 https://registry.npmjs.org/node-gcm/0.9.12
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/request
npm ERR! Error: No compatible version found: debug@'^0.8.1'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.1.0","0.2.0","0.3.0","0.4.0","0.4.1","0.5.0","0.6.0","0.7.0","0.7.1","0.7.2","0.7.3","0.7.4","0.8.0","0.8.1","1.0.0","1.0.1","1.0.2","1.0.3","1.0.4"]
npm ERR! at installTargetsError (/usr/local/lib/node_modules/npm/lib/cache.js:679:10)
npm ERR! at /usr/local/lib/node_modules/npm/lib/cache.js:594:10
npm ERR! at saved (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR! at Object.oncomplete (fs.js:302:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Darwin 13.3.0
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/hloftis/test/node-gcm
npm ERR! node -v v0.8.28
npm ERR! npm -v 1.2.12
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/hloftis/test/node-gcm/npm-debug.log
npm ERR! not ok code 0
Currently node-gcm claims to support node 0.6.0 and up:
https://github.com/ToothlessGear/node-gcm/blob/master/package.json#L122
However, because of using the new-style dependencies in package.json, node-gcm will fail on node versions below 0.10.x because its dependencies can't be parsed. The fix would either be to use backwards-compatible dependency version strings or to update the engines requirement to
">= 0.10.0"
.eg: