如何在meteorjs应用程序中使用npm gcm

如何在meteorjs应用程序中使用npm gcm,meteor,push-notification,npm,google-cloud-messaging,Meteor,Push Notification,Npm,Google Cloud Messaging,请告诉我,我完全不知道如何在我的android meteor js应用程序中使用npm gcm进行推送通知。我尝试使用“meteor添加meteorhacks:npm”,但我一直收到以下错误报告: W20160211-20:10:53.951(1)? (STDERR) W20160211-20:10:53.952(1)? (STDERR) /Users/bbgg/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x

请告诉我,我完全不知道如何在我的android meteor js应用程序中使用npm gcm进行推送通知。我尝试使用“meteor添加meteorhacks:npm”,但我一直收到以下错误报告:

W20160211-20:10:53.951(1)? (STDERR)           
W20160211-20:10:53.952(1)? (STDERR)   /Users/bbgg/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20160211-20:10:53.952(1)? (STDERR)                         throw(ex);
W20160211-20:10:53.953(1)? (STDERR)                               ^
W20160211-20:10:53.953(1)? (STDERR) Error: Can't find npm module 'node-gcm'. Did you forget to call 'Npm.depends' in package.js within the 'npm-container' package?
W20160211-20:10:53.953(1)? (STDERR)     at Object.Npm.require (/Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:175:17)
W20160211-20:10:53.953(1)? (STDERR)     at Object.Meteor.npmRequire (packages/npm-container/index.js:2:1)
W20160211-20:10:53.953(1)? (STDERR)     at server/app.js:2:22
W20160211-20:10:53.954(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/app/server/app.js:45:4
W20160211-20:10:53.954(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:242:10
W20160211-20:10:53.954(1)? (STDERR)     at Array.forEach (native)
W20160211-20:10:53.954(1)? (STDERR)     at Function._.each._.forEach (/Users/bbgg/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160211-20:10:53.954(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:137:5
=> Exited with code: 8
W20160211-20:11:07.823(1)? (STDERR)           
W20160211-20:11:07.824(1)? (STDERR) /Users/bbgg/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20160211-20:11:07.824(1)? (STDERR)                         throw(ex);
W20160211-20:11:07.824(1)? (STDERR)                               ^
W20160211-20:11:07.830(1)? (STDERR) Error: Can't find npm module 'node-gcm'. Did you forget to call 'Npm.depends' in package.js within the 'npm-container' package?
W20160211-20:11:07.830(1)? (STDERR)     at Object.Npm.require (/Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:175:17)
W20160211-20:11:07.831(1)? (STDERR)     at Object.Meteor.npmRequire (packages/npm-container/index.js:2:1)
W20160211-20:11:07.831(1)? (STDERR)     at server/app.js:2:22
W20160211-20:11:07.831(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/app/server/app.js:45:4
W20160211-20:11:07.831(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:242:10
W20160211-20:11:07.831(1)? (STDERR)     at Array.forEach (native)
W20160211-20:11:07.831(1)? (STDERR)     at Function._.each._.forEach (/Users/bbgg/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160211-20:11:07.831(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:137:5
=> Exited with code: 8
W20160211-20:11:20.323(1)? (STDERR)           
W20160211-20:11:20.324(1)? (STDERR) /Users/bbgg/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20160211-20:11:20.324(1)? (STDERR)                         throw(ex);
W20160211-20:11:20.324(1)? (STDERR)                               ^
W20160211-20:11:20.331(1)? (STDERR) Error: Can't find npm module 'node-gcm'. Did you forget to call 'Npm.depends' in package.js within the 'npm-container' package?
W20160211-20:11:20.331(1)? (STDERR)     at Object.Npm.require (/Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:175:17)
W20160211-20:11:20.331(1)? (STDERR)     at Object.Meteor.npmRequire (packages/npm-container/index.js:2:1)
W20160211-20:11:20.331(1)? (STDERR)     at server/app.js:2:22
W20160211-20:11:20.331(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/app/server/app.js:45:4
W20160211-20:11:20.332(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:242:10
W20160211-20:11:20.332(1)? (STDERR)     at Array.forEach (native)
W20160211-20:11:20.332(1)? (STDERR)     at Function._.each._.forEach (/Users/bbgg/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160211-20:11:20.332(1)? (STDERR)     at /Users/bbgg/GoodDay/.meteor/local/build/programs/server/boot.js:137:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.

您是否考虑过使用专用meteor软件包而不是GCM direct的自制实现,Raix提供的这个软件包非常好用,涵盖了移动应用程序和chrome等的推送消息功能:谢谢您的帮助!然而,关于其中包含的说明,有一件事尚不清楚,那就是如何安装raix push-in meteor应用程序。我打算从github下载它,解压缩并复制粘贴到meteor项目文件夹中。如果不应该这样做,请告诉我。非常感谢您的帮助。它位于meteor atmosphere存储库中,因此您只需使用meteor add raix:push在控制台中添加软件包即可。github上的文档应该有助于其余的设置