Background:
in my package.json:
{
...
"dependencies": {
...
"passport": ">=0.3.2",
"passport-jwt": ">=2.1.0",
"passport-local": ">=1.0.0",
"passport-facebook-token": "*",
"nodemailer":"*"
}
}
I just had to npm install on the local machine and everything worked as expected.
The Problem
I have pushed to git repo which is deployed to my Azure App Service. I made a test request that automatically calls npm install --production and kicks off the server. Azure threw an error:
Application has thrown an uncaught exception and is terminated:
Error: Cannot find module 'passport-facebook-token'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
...
After I manually ran npm install in the App Service Console it logged that passport-facebook-token was successfully installed. I retried the request and it worked!
So I thought it was a one-time issue. As I coded happily on and made another deployment the scenario repeated. And it keeps repeating.
Halp!
Background:
in my
package.json:I just had to
npm installon the local machine and everything worked as expected.The Problem
I have pushed to git repo which is deployed to my Azure App Service. I made a test request that automatically calls
npm install --productionand kicks off the server. Azure threw an error:After I manually ran
npm installin the App Service Console it logged thatpassport-facebook-tokenwas successfully installed. I retried the request and it worked!So I thought it was a one-time issue. As I coded happily on and made another deployment the scenario repeated. And it keeps repeating.
Halp!