David Sims
David Sims

Reputation: 1

Angular DEV build working but --prod build fails when deployed with ERROR TypeError: oI(...).database is not a function at main-es2015(etc).js

I'm able to build my project in both DEV and PROD with no errors on the compile, and am able to deploy both builds to my firebase hosting environment. The DEV build runs fine but I get a console error on the PROD build..

main-es2015.d02f828b5c57da1c86c4.js:1 ERROR TypeError: oI(...).database is not a function

javascript error https://i.sstatic.net/QH6WW.jpg

location in file https://i.sstatic.net/gsYsk.jpg

Tried compiling a DEV Build with --aot=true - that ran fine as well once deployed.

Upvotes: 0

Views: 159

Answers (1)

David Sims
David Sims

Reputation: 1

Solution found here - needed to use AngularFireDatabaseModule instead of AngularFireDatabase https://github.com/angular/angularfire2/issues/2132

Upvotes: 0

Related Questions