Cannot find module 'node-gcm'
node.js
Solution
If you've done a global install of the module, sometimes you need to create a symlink to the global module. Try `npm link node-gcm`.
Also try and install node-gcm without the global switch (`npm install node-gcm`), if it works locally you'll know it's an issue with the global install.
Problem
Im attempting to get Push notifications working with Android. Im following the tutorial here. It require installation of the node-gcm module of node.js. I installed this with the following command: ``` sudo npm install -g node-gcm ``` I have a file called notify.js. I run this with: ``` node notify.js ``` But I'm always getting the error: ``` module.js:333 throw err; ^ Error: Cannot find module 'node-gcm' at Function.Module._resolveFilename (module.js:331:15) at Function.Module._load (module.js:273:25) at Module.require (module.js:357:17) at require (module.js:373:17) at Object.<anonymous> (/var/www/PushPlay/notify.js:1:73) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:349:32) at Function.Module._load (module.js:305:12) at Function.Module.runMain (module.js:490:10) ``` Any ideas?