Angularfire: After adding firebase and angularfire2 i can't build my app

Created on 26 Jun 2017  路  1Comment  路  Source: angular/angularfire

i worked on app for a long time and at the end i needed small use of firebase so I installed it using npm install angularfire2 firebase --save,
and followed this steps : steps,
firebase works good for me but when i got ready to run on my device i got this error on ionic cordova run android

Error: ./~/firebase/app/shared_promise.js
Module not found: Error: Can't resolve 'promise-polyfill' in 'J:\Ionic2\Driver2\Driver\node_modules\firebase\app'
resolve 'promise-polyfill' in 'J:\Ionic2\Driver2\Driver\node_modules\firebase\app'
  Parsed request is a module
  using description file: J:\Ionic2\Driver2\Driver\node_modules\firebase\package.json (relative path: ./app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: J:\Ionic2\Driver2\Driver\node_modules\firebase\package.json (relative path: ./app)
    resolve as module
      looking for modules in J:\Ionic2\Driver2\Driver\node_modules
        using description file: J:\Ionic2\Driver2\Driver\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: J:\Ionic2\Driver2\Driver\package.json (relative path: ./node_modules)
          using description file: J:\Ionic2\Driver2\Driver\package.json (relative path: ./node_modules/promise-polyfill)
            as directory
              J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill doesn't exist
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill.json doesn't exist
[J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill]
[J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill]
[J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill.ts]
[J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill.js]
[J:\Ionic2\Driver2\Driver\node_modules\promise-polyfill.json]
 @ ./~/firebase/app/shared_promise.js 38:35-62
 @ ./~/firebase/app/firebase_app.js
 @ ./~/firebase/app.js
 @ ./~/firebase/database.js
 @ ./~/angularfire2/database/firebase_list_factory.js
 @ ./~/angularfire2/database.js
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts

my ionic info is:

global packages:

    @ionic/cli-utils : 1.4.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.6
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : android 6.2.3
    Ionic Framework                 : ionic-angular 3.1.1

System:

    Node       : v6.10.3
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 3.10.10

Most helpful comment

Check out this one https://github.com/ionic-team/ionic-app-scripts/issues/1001. It should fix you :)

>All comments

Check out this one https://github.com/ionic-team/ionic-app-scripts/issues/1001. It should fix you :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StephenFluin picture StephenFluin  路  3Comments

itisparas picture itisparas  路  3Comments

DennisSmolek picture DennisSmolek  路  3Comments

fisherds picture fisherds  路  3Comments

mypark picture mypark  路  3Comments