Skip to content

Cannot find module 'firebase/analytics' #2476

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

Closed
salime45 opened this issue May 25, 2020 · 2 comments
Closed

Cannot find module 'firebase/analytics' #2476

salime45 opened this issue May 25, 2020 · 2 comments

Comments

@salime45
Copy link

salime45 commented May 25, 2020

Hi, i am folloing the angular universal tutorial https://github.com/angular/angularfire/blob/master/docs/universal/cloud-functions.md and trying to deploy my app in firebase, I follow the steps and the app works fine in "firebase serve" but when i try to deploy the app appear the error

Function failed on loading user code. Error message: Code in file lib/index.js can't be loaded.
Did you list all required modules in the package.json dependencies?
Detailed stack trace: Error: Cannot find module 'firebase/analytics'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at webpackUniversalModuleDefinition (/srv/dist/server.js:3:28)
at Object. (/srv/dist/server.js:10:3)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)

Anyone knows what happen? My dependencies are :

"dependencies": {
"@angular/animations": "~8.2.4",
"@angular/common": "~8.2.4",
"@angular/compiler": "~8.2.4",
"@angular/core": "~8.2.4",
"@angular/fire": "^5.4.2",
"@angular/forms": "~8.2.4",
"@angular/platform-browser": "~8.2.4",
"@angular/platform-browser-dynamic": "~8.2.4",
"@angular/platform-server": "~8.2.4",
"@angular/router": "~8.2.4",
"@babel/compat-data": "^7.8.0",
"@firebase/analytics": "^0.3.5",
"@ng-bootstrap/ng-bootstrap": "^5.3.1",
"angular-font-awesome": "^3.1.2",
"bootstrap": "^4.4.1",
"firebase": "7.14.5",
"font-awesome": "^4.7.0",
"ngx-gist": "^1.0.4",
"rxjs": "~6.4.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},

@hiepxanh
Copy link
Contributor

hiepxanh commented Jun 2, 2020

you can follow this topic, maybe it can help #2320

@jamesdaniels
Copy link
Member

I believe this to have been addressed some time ago, if still having trouble with srr please open a new issue.

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

3 participants