Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'passport-facebook-token' When deploying on Azure #76

Open
kasradzenika opened this issue Jul 24, 2017 · 0 comments

Comments

@kasradzenika
Copy link

kasradzenika commented Jul 24, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant