Closed ghost closed 7 years ago
Are you sure you have installed the module on your server? (npm install node-gcm
)
@hypesystem Maybe we should be recommending to --save
to package.json
when installing:
https://github.com/ToothlessGear/node-gcm#installation
$ npm install node-gcm --save
I am torn: this seems like it should be really common knowledge, and might not work (if the folder has not yet been npm init
ed) -- on the other hand it might help a few people. I'll let that be up to you @eladnava -- whatever you think is best, I trust :smile:
Actually, it works! 😄
Maybe they fixed it in the newer npm
versions, but using node v4.4.5
, running the following works (it installs the module but creates no package.json
, which is fine):
cd ~
mkdir test
cd test
npm install node-gcm --save
# no error thrown
# node_modules/node-gcm exists! =)
Thanks it worked when I did npm install on DO server. But why did I have to do it again even if it was specified in package.json ?
@monera23 do you have a npm-shrinkwrap.json
file in your root project directory?
No.
@monera23 Maybe when you deployed your app to the DigitalOcean server, you didn't run npm install
in your project dir?
But earlier to this it has been working properly.
@monera23 what does your deployment process look like? What do you do when you need to deploy a new version?
@eladnava Great!
Closing due to lack of response. Please reopen if you still experience this issue.
The module node-gcm is working properly on my local system but when I try to use it on digital ocean using pm2 it shows an error - Can't find module 'node-gcm'. I am not able to get what is the problem.