Module not found: Error: Can't resolve '../../angularfire2/auth'

Error when build --prod, work fine without --prod

Error: ./src/app/app.module.ngfactory.js
Module not found: Error: Can't resolve '../../angularfire2/auth' in '/Users/huyle/Upwork/HuyLe/moneyTrackerApp/src/app'
resolve '../../angularfire2/auth' in '/Users/huyle/Upwork/HuyLe/moneyTrackerApp/src/app'
  using description file: /Users/huyle/Upwork/HuyLe/moneyTrackerApp/package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/huyle/Upwork/HuyLe/moneyTrackerApp/package.json (relative path: ./src/app)
    using description file: /Users/huyle/Upwork/HuyLe/moneyTrackerApp/package.json (relative path: ./angularfire2/auth)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/huyle/Upwork/HuyLe/moneyTrackerApp/angularfire2/auth doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/huyle/Upwork/HuyLe/moneyTrackerApp/angularfire2/auth.js doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/huyle/Upwork/HuyLe/moneyTrackerApp/angularfire2/auth.ts doesn't exist
      as directory
        /Users/huyle/Upwork/HuyLe/moneyTrackerApp/angularfire2/auth doesn't exist
1 Like

I remember seeing this multiple times already posted before. Did you search the forum for parts of your error message?

Ok. Sorry. Please close it.

how did you resolve it??? i have the same issue

@mort12 - I downgraded angular fire to rc1 as This post suggested and it fixed the issue for me.

2 Likes

i think that for ionic 3 you have to use only firebase imported from firebase,

Import firebase from ‘firebase/app’ so you can take advantage of tree shaking.

How did you solve this issue??

I am with the same one here.