Can't build app after firebase.initializaApp()

717 views
Skip to first unread message

gmot...@gmail.com

unread,
Apr 15, 2017, 3:23:39 PM4/15/17
to Firebase Google Group
Hello.

I got a problem and I cannot find any answer on internet.

I am building small webapp and use firebase as my backend. Everything was ok and my application run smoothly but today suddenly stop building after 'ng serve'. I always get the same error:

ERROR in ./~/firebase/app/shared_promise.js
Module not found: Error: Can't resolve 'promise-polyfill' in '/Users/user/Desktop/GMO/node_modules/firebase/app'
 @ ./~/firebase/app/shared_promise.js 22:35-62
 @ ./~/firebase/app/firebase_app.js
 @ ./~/firebase/app.js
 @ ./~/firebase/firebase-browser.js
 @ ./src/app/app.component.ts
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

and after deleting and inserting back code lines I found that this error happens after I add: 
firebase.initializaApp({my_database_api_key_and_auth_domain})

inside onInit() function in main component.

Of course when my app was running before I also got this line and everything was ok. I am really out of ideas. I am sure that I didn't change anything in firebase module (inside node_modules) directory.

Can you please help me with that?

Thank you and regards.


Bassam

unread,
Apr 15, 2017, 6:59:51 PM4/15/17
to Firebase Google Group
What version of firebase are you using? Try to upgrade to 3.7.8. Let us know if this fixes the problem.

Best regards,
Bassam

gmot...@gmail.com

unread,
Apr 16, 2017, 1:23:35 AM4/16/17
to Firebase Google Group
This was indeed problem with version.
Solution:

npm install promise-polyfill --save

npm install

Now app is building again.

jbg.d...@gmail.com

unread,
May 20, 2017, 11:21:37 PM5/20/17
to Firebase Google Group
Thanks you very much!! it's work for me
Reply all
Reply to author
Forward
0 new messages