Error build app android , ios

when i tray to build my app to android and ios i get this long error
i tray to build in windows to build android only and tray to build ios and android on mac but the same error message i get

[20:23:43]  preprocess started ...
[20:23:43]  deeplinks started ...
[20:23:47]  deeplinks finished in 3.28 s
[20:23:47]  preprocess finished in 3.33 s
[20:23:47]  webpack started ...
[20:23:51]  copy finished in 36.52 s
Error: ./node_modules/firebase/utils/promise.js
Module not found: Error: Can't resolve 'promise-polyfill' in '/Users/fouad/Desktop/ChatsApp/node_modules/firebase/utils'
resolve 'promise-polyfill' in '/Users/fouad/Desktop/ChatsApp/node_modules/firebase/utils'
  Parsed request is a module
  using description file: /Users/fouad/Desktop/ChatsApp/node_modules/firebase/package.json (relative path: ./utils)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/fouad/Desktop/ChatsApp/node_modules/firebase/package.json (relative path: ./utils)
    resolve as module
      looking for modules in /Users/fouad/Desktop/ChatsApp/node_modules
        using description file: /Users/fouad/Desktop/ChatsApp/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Users/fouad/Desktop/ChatsApp/package.json (relative path: ./node_modules)
          using description file: /Users/fouad/Desktop/ChatsApp/package.json (relative path: ./node_modules/promise-polyfill)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill.json doesn't exist
            as directory
              /Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill doesn't exist
[/Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill]
[/Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill.ts]
[/Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill.js]
[/Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill.json]
[/Users/fouad/Desktop/ChatsApp/node_modules/promise-polyfill]
 @ ./node_modules/firebase/utils/promise.js 14:76-103
 @ ./node_modules/firebase/database/api/Query.js
 @ ./node_modules/firebase/database.js
 @ ./node_modules/angularfire2/database/firebase_list_observable.js
 @ ./node_modules/angularfire2/database.js
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts

I changed your post to format your code or error message correctly. Please use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

Search for the “Error” line and the next one here in the forum - I remember multiple posts about exactly this problem.

Also for your next post: Please include ionic info output and the exact command you are running. Thanks.

1 Like

after googling this error i found solution for this error using

npm install promise-polyfill --save-exact


and my problem now solved.
thanks gyes

1 Like

Did someone create an issue with the Firebase guys about this? They should a) add this themselves or b) change their code so that webpack doesn’t mess up here…