Skip to content

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

Description

@kasradzenika

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions