firebase / firebase/firebase-admin-node
Cannot find module 'firebase-admin/app'
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 16
Description
`package.json` requirements look like this –
```
"dependencies": {
"@sentry/node": "^5.30.0",
"body-parser": "1.19.0",
"express": "^4.17.1",
"firebase-admin": "10.0.0",
"mysql": "^2.18.1",
"pug": "3.0.2"
}
```
`node_modules` has the corresponding module in the path `~/node_modules/firebase-admin/lib/app`
Node code reads as –
```
const initializeApp = require('firebase-admin/app');
```
And when the app is run, the following stacktrace emerges.
```
Error: Cannot find module 'firebase-admin/app'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object. (/var/www/html/project/backend/main.js:16:24)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
```
Contributor guide
Research direction
Start with package.json and backend/main.js at line 16, then reproduce the reported require failure using firebase-admin 10.0.0. Inspect the installed firebase-admin/lib/app layout and the package's module entry points. Done means the Firebase Admin import resolves and the application starts without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100