question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firebase / AngularFire related error when loading

See original GitHub issue

I’m submitting a…


[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

In package


[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[x] @ng-toolkit/universal

Current behavior

npm run server
Some firebase related warning show in the console but seems to compile ok. When refreshing at localhost:8080 a blank screen with two curly brackets {} is loaded.

The console shows

ERROR TypeError: Cannot read property 'filter' of undefined at _firebaseAppFactory (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:53335:174) at /Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:153550:66 at ZoneDelegate.module.exports.ZoneDelegate.invoke (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:199616:26) at Zone.module.exports.Zone.run (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:199366:43) at NgZone.module.exports.NgZone.runOutsideAngular (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:4068:28) at new AngularFireDatabase (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:153549:30) at _createClass (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:8575:20) at _createProviderInstance$1 (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:8537:26) at resolveNgModuleDep (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:8500:21) at _createClass (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:8567:68) TypeError: Cannot read property 'filter' of undefined at _firebaseAppFactory (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:53335:174) at /Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:153550:66 at ZoneDelegate.module.exports.ZoneDelegate.invoke (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:199616:26) at Zone.module.exports.Zone.run (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:199366:43) at NgZone.module.exports.NgZone.runOutsideAngular (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:4068:28) at new AngularFireDatabase (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:153549:30) at _createClass (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:8575:20) at _createProviderInstance$1 (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:8537:26) at resolveNgModuleDep (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:8500:21) at _createClass (/Users/alejandroquadri/Dev/webs/quadri-web/dist/server.js:8567:68)

app compiles perfectly when running ng serve

Minimal reproduction of the problem with instructions

just run npm run server and try to load at localhost:8080

Example repository

https://github.com/alejandroquadri/quadri-web.git seo-friendly branch

Environment

Angular CLI: 6.0.8 Node: 8.11.3 OS: darwin x64 Angular: 6.0.7

Browser:

  • Chrome (desktop) version 67.0.3396.99 (Build oficial) (64 bits)
  • Chrome (Android) version XX
  • Chrome (iOS) version XX
  • Firefox version XX
  • Safari (desktop) version XX
  • Safari (iOS) version XX
  • IE version XX
  • Edge version XX

For Tooling issues:

  • Node version: 8.11.3
  • Platform: Mac

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
Konondocommented, Jul 20, 2018

This is apparently an issue with Angularfire2 (see thread https://github.com/angular/angularfire2/issues/1705). The solution of anasbaddyr works for me : " Using rc.11 i went to node_modules/angularfire2/firebase.app.module.js I changed import * as firebase from ‘firebase/app’; to import firebase from ‘firebase/app’; "

1reaction
Rubenazocommented, Jul 25, 2018

@Konondo that didn’t work for me, using rc.11 changed same line, got same result.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR in node_modules/@angular/fire/firebase.app.module ...
This incompatibility issue has been flagged on the official @angular/fire GitHub page here. The proposed workaround worked for me. In short:.
Read more >
Error in complilation ERROR in node_modules/@angular/fire ...
Hi, Please help me with the folllowing compiling issue: I have installed : angularfire2@5.4.2; firebase@8.0.0.
Read more >
Access data offline | Firestore - Firebase
When fetching a specific document, an error is returned instead. Query offline data. Querying works with offline persistence. You can retrieve the results...
Read more >
Weird angular firebase error while building the application.
I am facing this weird error ever since I deleted my dist folder.I did not change any piece of code or any package...
Read more >
Fixing type definitions error when using the firebase npm library
Simply uninstall the current version of the firebase npm package and install/downgrade to the previous version instead. From your command line, and ensuring ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found