angular-seed-advanced icon indicating copy to clipboard operation
angular-seed-advanced copied to clipboard

"promise-polyfill" problem with integration angularfire2

Open vyava opened this issue 7 years ago • 5 comments

Hello. I'm new on this seed project. I was trying to understand how should i import angularfire2 and firebase. As i understand, this seed have a problem with integration angularfire2. Or i'm importing wrong way, but i dont't think so.

I added firebase and angularfire2 in the following way..

import

And i got an error like that..

firebase-error

Is there something wrong with me? Or is this an issue?

vyava avatar Jul 08 '17 20:07 vyava

Have you tried any tips from here: https://github.com/mgechev/angular-seed/wiki/Integration-with-AngularFire2

NathanWalker avatar Jul 09 '17 00:07 NathanWalker

I tried it, but that did not work either. It's also have a problem with AngularFire configuration

this.addPackageBundles({
      name: 'angularfire2',
      path: 'node_modules/angularfire2/bundles/angularfire2.umd.js',
      packageMeta: {
        main: 'angularfire2.js',
        defaultExtension: 'js'
      }
});

Trying to load in the following way and failing

node_modules/angularfire2/bundles/angularfire2.umd.js/angularfire2.js

I changed like following way. it's fixing that but main problem still continue.

this.addPackageBundles({
      name: 'angularfire2',
      path: 'node_modules/angularfire2/bundles/',
      packageMeta: {
        main: 'angularfire2.umd.js',
        defaultExtension: 'js'
      }
});

vyava avatar Jul 09 '17 09:07 vyava

Try adding for promise-polyfill after npm i --save-dev promise-polyfill

this.addPackageBundles({
     name: 'promise-polyfill',
     path: 'node_modules/promise-polyfill/promise.js',
     packageMeta: {
       main: 'promise.js',
       defaultExtension: 'js'
     }
   });

gokhancelik avatar Jul 25 '17 22:07 gokhancelik

Hi; I was trying to set it up too, and I ran into this issue. Seems to be a common issue from angularfire2.

Then I went back and tried this tutorial and I did get firebase to work on my app (currently web/desktop).

Maybe you should give it a try.

eastolfi avatar Jul 26 '17 08:07 eastolfi

I'll try it soon. Thanks for response.

vyava avatar Jul 29 '17 22:07 vyava