Reputation: 425
I am getting this error when i try to use node-gcm in my code. I have included it as per standard methods require('node-gcm')
var message = new gcm.Message();
^
TypeError: gcm.Message is not a function
at Object.<anonymous> (/home/parashar/Downloads/opentsdb.js:13:15)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
Can someone help me out?
Upvotes: 0
Views: 345
Reputation: 203359
Judging by this issue, it may be that an alpha version of node-gcm
was mistakenly published as being the latest stable one.
Until that's fixed, you can try this to get your code working again:
npm install node-gcm@0
EDIT: the issue should be fixed now.
Upvotes: 1