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 'firebase-admin' #704

Closed
Nicour opened this issue Nov 14, 2019 · 4 comments
Closed

⚠ Error: Cannot find module 'firebase-admin' #704

Nicour opened this issue Nov 14, 2019 · 4 comments

Comments

@Nicour
Copy link

Nicour commented Nov 14, 2019

Hello,

I am running my app locally and i am having this error:

"i Starting emulators: ["functions","hosting"]
? Your requested "node" version "8" doesn't match your global version "12"
? functions: Emulator started at http://localhost:5001
i hosting: Serving hosting files from: public
? hosting: Local server: http://localhost:5000
? hosting: Emulator started at http://localhost:5000
i functions: Watching "/Users/nico/Documents/nexow/nexow-api-firebase/functions" for Cloud Functions...
? Error: Cannot find module 'firebase-admin'
Require stack:

  • /Users/nico/.nvm/versions/node/v12.6.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at Object. (/Users/nico/Documents/nexow/nexow-api-firebase/functions/node_modules/express-firebase-middleware/lib/auth.middleware.js:10:26)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:683:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    ? We were unable to load your functions code. (see above)"

I've already done all the NPM installs, but no way...
A few hours ago it worked and recently stop working. My partner is running the same code and it works for him.
I tryed try deleting first both the 'package-lock.json' file and the 'node_modules' folder before running the npm install command again but don´t work.

Do anyone know where is the problem?

Thank you

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@hiranya911
Copy link
Contributor

@ltnilaysahu
Copy link

I am facing the same issue still. Inspite of doing npm-install , on npm start, firebase-admin cannot be found.

@shkumbinhasani
Copy link

Did you find any solution, still stuck on this

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

No branches or pull requests

5 participants