New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found: Error: Can't resolve 'promise-polyfill' #1001

Open
gigocabrera opened this Issue May 21, 2017 · 42 comments

Comments

Projects
None yet
@gigocabrera

gigocabrera commented May 21, 2017

Short description of the problem:

I'm seeing a weird behavior. When I run ionic serve my app builds and runs as expected. No issues. HOWEVER, when I run ionic upload to test the app in ionic view I get the error message below.

I KNOW it's a firebase error BUT why does it work fine using ionic serve and not with ionic upload?

What behavior are you expecting?

If running ionic serve works without any errors, I expect ionic upload to work as well.

Steps to reproduce:

Not sure how to reproduce this issue. Best if you visit my repo

  1. CajaFuerte
Running app-scripts build:

[20:57:28]  build dev started ...
[20:57:29]  clean started ...
[20:57:29]  clean finished in 7 ms
[20:57:29]  copy started ...
[20:57:29]  transpile started ...
[20:57:32]  transpile finished in 3.52 s
[20:57:32]  preprocess started ...
[20:57:32]  deeplinks started ...
[20:57:32]  deeplinks finished in 89 ms
[20:57:32]  preprocess finished in 91 ms
[20:57:32]  webpack started ...
[20:57:32]  copy finished in 3.86 s
Error: ./~/firebase/app/shared_promise.js
Module not found: Error: Can't resolve 'promise-polyfill' in 'C:\ionic\CajaFuerte-app\node_modules\firebase\app'
resolve 'promise-polyfill' in 'C:\ionic\CajaFuerte-app\node_modules\firebase\app'
  Parsed request is a module
  using description file: C:\ionic\CajaFuerte-app\node_modules\firebase\package.json (relative path: ./app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\ionic\CajaFuerte-app\node_modules\firebase\package.json (relative path: ./app)
    resolve as module
      looking for modules in C:\ionic\CajaFuerte-app\node_modules
        using description file: C:\ionic\CajaFuerte-app\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\ionic\CajaFuerte-app\package.json (relative path: ./node_modules)
          using description file: C:\ionic\CajaFuerte-app\package.json (relative path: ./node_modules/promise-polyfill)
            as directory
              C:\ionic\CajaFuerte-app\node_modules\promise-polyfill doesn't exist
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\ionic\CajaFuerte-app\node_modules\promise-polyfill doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              C:\ionic\CajaFuerte-app\node_modules\promise-polyfill.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\ionic\CajaFuerte-app\node_modules\promise-polyfill.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              C:\ionic\CajaFuerte-app\node_modules\promise-polyfill.json doesn't exist
[C:\ionic\CajaFuerte-app\node_modules\promise-polyfill]
[C:\ionic\CajaFuerte-app\node_modules\promise-polyfill]
[C:\ionic\CajaFuerte-app\node_modules\promise-polyfill.ts]
[C:\ionic\CajaFuerte-app\node_modules\promise-polyfill.js]
[C:\ionic\CajaFuerte-app\node_modules\promise-polyfill.json]
 @ ./~/firebase/app/shared_promise.js 37:35-62
 @ ./~/firebase/app/firebase_app.js
 @ ./~/firebase/app.js
 @ ./~/firebase/firebase-browser.js
 @ ./src/providers/auth-service.ts
 @ ./src/app/app.module.ts
 @ ./src/app/main.ts

Which @ionic/app-scripts version are you using?

PS C:\ionic\CajaFuerte-app> ionic info

global packages:

    @ionic/cli-utils : 1.1.2
    Cordova CLI      : 6.5.0
    Ionic CLI        : 3.1.2

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.1.2
    @ionic/cli-plugin-ionic-angular : 1.1.2
    Ionic Framework                 : ionic-angular 3.2.1

System:

    Node       : v7.9.0
    OS         : Windows 10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed

@mcorrigan

This comment has been minimized.

Show comment
Hide comment
@mcorrigan

mcorrigan May 22, 2017

Had the same issue, this solved it:

npm install promise-polyfill --save-exact

Source: http://stackoverflow.com/questions/43428415/error-in-firebase-app-shared-promise-js

mcorrigan commented May 22, 2017

Had the same issue, this solved it:

npm install promise-polyfill --save-exact

Source: http://stackoverflow.com/questions/43428415/error-in-firebase-app-shared-promise-js

@gigocabrera

This comment has been minimized.

Show comment
Hide comment
@gigocabrera

gigocabrera May 22, 2017

@mcorrigan that did it. Thank you very much!!!

gigocabrera commented May 22, 2017

@mcorrigan that did it. Thank you very much!!!

@percipio

This comment has been minimized.

Show comment
Hide comment
@percipio

percipio May 27, 2017

Woot! This worked for me also.

percipio commented May 27, 2017

Woot! This worked for me also.

@joladubu

This comment has been minimized.

Show comment
Hide comment
@joladubu

joladubu May 31, 2017

working ... working .... worked for me!!!... gracias @mcorrigan

joladubu commented May 31, 2017

working ... working .... worked for me!!!... gracias @mcorrigan

@HommyDeJ

This comment has been minimized.

Show comment
Hide comment
@HommyDeJ

HommyDeJ Jun 4, 2017

Hello I did that and now I'm having another problem.

ionic cordova run android
Running app-scripts build: --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --
externalIpRequired --nobrowser

[16:01:36] build dev started ...
[16:01:36] clean started ...
[16:01:36] clean finished in 3 ms
[16:01:36] copy started ...
[16:01:36] transpile started ...
[16:01:41] transpile finished in 5.00 s
[16:01:41] preprocess started ...
[16:01:41] deeplinks started ...
[16:01:42] deeplinks finished in 23 ms
W
[16:01:42] preprocess finished in 25 ms
[16:01:42] webpack started ...
[16:01:42] copy finished in 5.31 s
[16:02:06] webpack finished in 24.50 s
[16:02:06] sass started ...
[16:02:09] sass finished in 2.55 s
[16:02:09] postprocess started ...
[16:02:09] postprocess finished in 10 ms
[16:02:09] lint started ...
[16:02:09] build dev finished in 32.22 s

cordova run android
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova run android (exit code 1).

hommydejesus@Hommy-PC:~/DenunciasApp$ (node:12726) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
(node:12726) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejectio
ns that are not handled will terminate the Node.js process with a non-zero exit code.

HommyDeJ commented Jun 4, 2017

Hello I did that and now I'm having another problem.

ionic cordova run android
Running app-scripts build: --address 0.0.0.0 --port 8100 --p 8100 --livereload-port 35729 --r 35729 --iscordovaserve --
externalIpRequired --nobrowser

[16:01:36] build dev started ...
[16:01:36] clean started ...
[16:01:36] clean finished in 3 ms
[16:01:36] copy started ...
[16:01:36] transpile started ...
[16:01:41] transpile finished in 5.00 s
[16:01:41] preprocess started ...
[16:01:41] deeplinks started ...
[16:01:42] deeplinks finished in 23 ms
W
[16:01:42] preprocess finished in 25 ms
[16:01:42] webpack started ...
[16:01:42] copy finished in 5.31 s
[16:02:06] webpack finished in 24.50 s
[16:02:06] sass started ...
[16:02:09] sass finished in 2.55 s
[16:02:09] postprocess started ...
[16:02:09] postprocess finished in 10 ms
[16:02:09] lint started ...
[16:02:09] build dev finished in 32.22 s

cordova run android
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova run android (exit code 1).

hommydejesus@Hommy-PC:~/DenunciasApp$ (node:12726) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): Error [ERR_IPC_CHANNEL_CLOSED]: channel closed
(node:12726) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejectio
ns that are not handled will terminate the Node.js process with a non-zero exit code.

@fayeyen

This comment has been minimized.

Show comment
Hide comment
@fayeyen

fayeyen commented Jun 13, 2017

thanks @mcorrigan

@MykalMachon

This comment has been minimized.

Show comment
Hide comment
@MykalMachon

MykalMachon Jun 21, 2017

@HommyDeJ I got this same error. Do you have the android development environment properly set up? the fastest way to do this is to install Android developer Studio.

MykalMachon commented Jun 21, 2017

@HommyDeJ I got this same error. Do you have the android development environment properly set up? the fastest way to do this is to install Android developer Studio.

@gigocabrera gigocabrera reopened this Jun 23, 2017

@gigocabrera

This comment has been minimized.

Show comment
Hide comment
@gigocabrera

gigocabrera Jun 23, 2017

I got the same issue after updating to the latest ionic. Running the command below fixed it again

npm install promise-polyfill --save-exact

But do I have to run this command for every ionic update?

Which version are you using?

PS C:\ionic\CajaFuerte-app> ionic info

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.7
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : ios 4.3.1
Ionic Framework                 : ionic-angular 3.4.2

System:

Node       : v7.9.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.8

gigocabrera commented Jun 23, 2017

I got the same issue after updating to the latest ionic. Running the command below fixed it again

npm install promise-polyfill --save-exact

But do I have to run this command for every ionic update?

Which version are you using?

PS C:\ionic\CajaFuerte-app> ionic info

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.7
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : ios 4.3.1
Ionic Framework                 : ionic-angular 3.4.2

System:

Node       : v7.9.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.8
@jiteshkaranjkar

This comment has been minimized.

Show comment
Hide comment
@jiteshkaranjkar

jiteshkaranjkar Jun 24, 2017

Worked for me Thanks @mcorrigan

jiteshkaranjkar commented Jun 24, 2017

Worked for me Thanks @mcorrigan

@janpio

This comment has been minimized.

Show comment
Hide comment
@janpio

janpio Jun 28, 2017

Someone should open an issue with the package causing this problem, that this package gets added to their package.json.

janpio commented Jun 28, 2017

Someone should open an issue with the package causing this problem, that this package gets added to their package.json.

@BraxAttack

This comment has been minimized.

Show comment
Hide comment
@BraxAttack

BraxAttack Jul 4, 2017

@mcorrigan you are a beautiful person!

BraxAttack commented Jul 4, 2017

@mcorrigan you are a beautiful person!

@youstartlabs

This comment has been minimized.

Show comment
Hide comment
@youstartlabs

youstartlabs Jul 5, 2017

Bro You Make My day

youstartlabs commented Jul 5, 2017

Bro You Make My day

@gkiran1

This comment has been minimized.

Show comment
Hide comment
@gkiran1

gkiran1 commented Jul 6, 2017

Awesome... @mcorrigan

@boraikizoglu

This comment has been minimized.

Show comment
Hide comment
@boraikizoglu

boraikizoglu Jul 14, 2017

@mcorrigan This worked for me. Thanks

boraikizoglu commented Jul 14, 2017

@mcorrigan This worked for me. Thanks

@david95thinkcode

This comment has been minimized.

Show comment
Hide comment
@david95thinkcode

david95thinkcode Jul 17, 2017

@mcorrigan Thanks. Worked for me

david95thinkcode commented Jul 17, 2017

@mcorrigan Thanks. Worked for me

@kev-phillips

This comment has been minimized.

Show comment
Hide comment
@kev-phillips

kev-phillips Jul 18, 2017

Great. Put me in the fan of @mcorrigan camp 👍

kev-phillips commented Jul 18, 2017

Great. Put me in the fan of @mcorrigan camp 👍

@ChristianVega5421

This comment has been minimized.

Show comment
Hide comment
@ChristianVega5421

ChristianVega5421 Jul 19, 2017

wooooow yes, working working, thanks so much

ChristianVega5421 commented Jul 19, 2017

wooooow yes, working working, thanks so much

@bharathkumarms

This comment has been minimized.

Show comment
Hide comment
@bharathkumarms

bharathkumarms commented Jul 21, 2017

Oh Great!

@faridhajnal

This comment has been minimized.

Show comment
Hide comment
@faridhajnal

faridhajnal Jul 26, 2017

Life Saver ! Thanks a lot !

faridhajnal commented Jul 26, 2017

Life Saver ! Thanks a lot !

@mayoljonathan

This comment has been minimized.

Show comment
Hide comment
@mayoljonathan

mayoljonathan commented Jul 27, 2017

Thanks !

@ruchiy48

This comment has been minimized.

Show comment
Hide comment
@ruchiy48

ruchiy48 Jul 28, 2017

hey, @mcorrigan thanks a lot! Worked for me..

ruchiy48 commented Jul 28, 2017

hey, @mcorrigan thanks a lot! Worked for me..

@talcual

This comment has been minimized.

Show comment
Hide comment
@talcual

talcual Aug 2, 2017

that's great, worked for me

talcual commented Aug 2, 2017

that's great, worked for me

@QUINNYELIZ

This comment has been minimized.

Show comment
Hide comment
@QUINNYELIZ

QUINNYELIZ Aug 2, 2017

@mcorrigan Thanks a lot it worked for me.

QUINNYELIZ commented Aug 2, 2017

@mcorrigan Thanks a lot it worked for me.

@bunday

This comment has been minimized.

Show comment
Hide comment
@bunday

bunday Aug 8, 2017

awesome! thank you for this solution

bunday commented Aug 8, 2017

awesome! thank you for this solution

@MichaelHuy

This comment has been minimized.

Show comment
Hide comment
@MichaelHuy

MichaelHuy Aug 22, 2017

Not working with: --prod, ionic cordova build android --prod.
Fine with : ionic cordova build android

MichaelHuy commented Aug 22, 2017

Not working with: --prod, ionic cordova build android --prod.
Fine with : ionic cordova build android

@MichaelHuy

This comment has been minimized.

Show comment
Hide comment
@MichaelHuy

MichaelHuy Aug 22, 2017

Still error with latest ionic cli 3.9.2
Work fine without --prod. I think there is problem with --prod build.
Here is log from my console
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

MichaelHuy commented Aug 22, 2017

Still error with latest ionic cli 3.9.2
Work fine without --prod. I think there is problem with --prod build.
Here is log from my console
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

@drashtimachchar

This comment has been minimized.

Show comment
Hide comment
@drashtimachchar

drashtimachchar Aug 28, 2017

npm install promise-polyfill --save-exact
I did it and It's working for me
@mcorrigan Thanks!

drashtimachchar commented Aug 28, 2017

npm install promise-polyfill --save-exact
I did it and It's working for me
@mcorrigan Thanks!

@razvantomegea

This comment has been minimized.

Show comment
Hide comment
@razvantomegea

razvantomegea Sep 2, 2017

@mcorrigan Worked magically! 👍

razvantomegea commented Sep 2, 2017

@mcorrigan Worked magically! 👍

@matheus-fatguys

This comment has been minimized.

Show comment
Hide comment
@matheus-fatguys

matheus-fatguys Sep 3, 2017

npm install promise-polyfill --save-exact

Great! I think it saved me much time! Thank you

matheus-fatguys commented Sep 3, 2017

npm install promise-polyfill --save-exact

Great! I think it saved me much time! Thank you

danielsogl added a commit to danielsogl/angularfire2 that referenced this issue Sep 5, 2017

davideast added a commit to angular/angularfire2 that referenced this issue Sep 6, 2017

@GURUcle

This comment has been minimized.

Show comment
Hide comment
@GURUcle

GURUcle Sep 6, 2017

thnx bro

GURUcle commented Sep 6, 2017

thnx bro

@itszerocode

This comment has been minimized.

Show comment
Hide comment
@itszerocode

itszerocode Sep 10, 2017

@mcorrigan worked for me as well. Thanks!

itszerocode commented Sep 10, 2017

@mcorrigan worked for me as well. Thanks!

alltej added a commit to alltej/i3-fb-image-capture that referenced this issue Sep 12, 2017

@gopigopi096

This comment has been minimized.

Show comment
Hide comment
@gopigopi096

gopigopi096 Sep 15, 2017

@mcorrigan super it worked for me

gopigopi096 commented Sep 15, 2017

@mcorrigan super it worked for me

@joladubu

This comment has been minimized.

Show comment
Hide comment
@joladubu

joladubu Sep 17, 2017

thank you @gigocabrera and @mcorrigan . Worked fine. thumbs up

joladubu commented Sep 17, 2017

thank you @gigocabrera and @mcorrigan . Worked fine. thumbs up

@RodibelMorales

This comment has been minimized.

Show comment
Hide comment
@RodibelMorales

RodibelMorales Sep 21, 2017

i have the same problem, it worked for me. thanks

RodibelMorales commented Sep 21, 2017

i have the same problem, it worked for me. thanks

@ss34nirala34

This comment has been minimized.

Show comment
Hide comment
@ss34nirala34

ss34nirala34 Sep 22, 2017

@mcorrigan: Thank you so much.
I was facing same issue. After running the command below fixed it.
npm install promise-polyfill --save-exact.

First time failed, but again I tried running same command and worked perfectly.

Q: After running this command a file is created package-lock.json, what is this?

ss34nirala34 commented Sep 22, 2017

@mcorrigan: Thank you so much.
I was facing same issue. After running the command below fixed it.
npm install promise-polyfill --save-exact.

First time failed, but again I tried running same command and worked perfectly.

Q: After running this command a file is created package-lock.json, what is this?

@Tommertom

This comment has been minimized.

Show comment
Hide comment
@Tommertom

Tommertom Sep 24, 2017

Hi, while the npm install promise-polyfill --save-exact helps with me as well, the upload to Ionic Pro creates a build fail with the same error.

EDIT: fixed issue by adding "promise-polyfill":"6.0.2" to package.json

`
Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
on IonicJS Snapshot Runner (6c67ff43)
Using Shell executor...
Running on ip-10-2-119-255...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/6c67ff43/0/project-1'...
Checking out ab06ea2b as master...
Skipping Git submodules setup
$ fetch-updates
Checking for build process updates...
$ build-app
Fetching build dependencies...
Running: npm install
npm WARN deprecated babili@0.1.2: babili has been renamed to babel-minify. Please update to babel-minify
npm WARN deprecated babel-preset-babili@0.1.4: babili has been renamed to babel-minify. Please update to babel-preset-minify
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys

node-sass@4.5.3 install /usr/src/app/node_modules/node-sass
node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-57_binding.node
Download complete
Binary saved to /usr/src/app/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /home/gitlab-runner/.npm/node-sass/4.5.3/linux-x64-57_binding.node

uglifyjs-webpack-plugin@0.4.6 postinstall /usr/src/app/node_modules/uglifyjs-webpack-plugin
node lib/post_install.js

node-sass@4.5.3 postinstall /usr/src/app/node_modules/node-sass
node scripts/build.js

Binary found at /usr/src/app/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 800 packages in 69.033s
npm install succeeded
Running: npm run build
npm info it worked if it ends with ok
npm info using npm@5.3.0
npm info using node@v8.2.1
npm info lifecycle agriscoor@0.0.1prebuild: agriscoor@0.0.1
npm info lifecycle agriscoor@0.0.1
build: agriscoor@0.0.1

agriscoor@0.0.1 build /usr/src/app
ionic-app-scripts build

[18:40:33] ionic-app-scripts 2.1.4
[18:40:33] build dev started ...
[18:40:33] clean started ...
[18:40:33] clean finished in 1 ms
[18:40:33] copy started ...
[18:40:33] transpile started ...
[18:40:38] transpile finished in 4.93 s
[18:40:38] preprocess started ...
[18:40:38] deeplinks started ...
[18:40:38] deeplinks finished in 129 ms
[18:40:38] preprocess finished in 131 ms
[18:40:38] webpack started ...
[18:40:39] copy finished in 5.36 s
[18:40:54] ionic-app-script task: "build"
[18:40:54] Error: ./node_modules/firebase/utils/promise.js Module not found: Error: Can't resolve 'promise-polyfill' in
'/usr/src/app/node_modules/firebase/utils' resolve 'promise-polyfill' in
'/usr/src/app/node_modules/firebase/utils' Parsed request is a module using description file:
/usr/src/app/node_modules/firebase/package.json (relative path: ./utils) Field 'browser' doesn't contain a
valid alias configuration after using description file: /usr/src/app/node_modules/firebase/package.json
(relative path: ./utils) resolve as module looking for modules in /usr/src/app/node_modules using
description file: /usr/src/app/package.json (relative path: ./node_modules) Field 'browser' doesn't contain
a valid alias configuration after using description file: /usr/src/app/package.json (relative path:
./node_modules) using description file: /usr/src/app/package.json (relative path:
./node_modules/promise-polyfill) no extension Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill doesn't exist .ts Field 'browser' doesn't contain a valid alias
configuration /usr/src/app/node_modules/promise-polyfill.ts doesn't exist .js Field 'browser' doesn't
contain a valid alias configuration /usr/src/app/node_modules/promise-polyfill.js doesn't exist .json Field
'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/promise-polyfill.json
doesn't exist as directory /usr/src/app/node_modules/promise-polyfill doesn't exist
[/usr/src/app/node_modules/promise-polyfill] [/usr/src/app/node_modules/promise-polyfill.ts]
[/usr/src/app/node_modules/promise-polyfill.js] [/usr/src/app/node_modules/promise-polyfill.json]
[/usr/src/app/node_modules/promise-polyfill] @ ./node_modules/firebase/utils/promise.js 14:76-103 @
./node_modules/firebase/app/firebase_app.js @ ./node_modules/firebase/app.js @
./node_modules/angularfire2/firebase.app.module.js @ ./node_modules/angularfire2/index.js @
./src/app/app.module.ts @ ./src/app/main.ts
Error: ./node_modules/firebase/utils/promise.js
Module not found: Error: Can't resolve 'promise-polyfill' in '/usr/src/app/node_modules/firebase/utils'
resolve 'promise-polyfill' in '/usr/src/app/node_modules/firebase/utils'
Parsed request is a module
using description file: /usr/src/app/node_modules/firebase/package.json (relative path: ./utils)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /usr/src/app/node_modules/firebase/package.json (relative path: ./utils)
resolve as module
looking for modules in /usr/src/app/node_modules
using description file: /usr/src/app/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /usr/src/app/package.json (relative path: ./node_modules)
using description file: /usr/src/app/package.json (relative path: ./node_modules/promise-polyfill)
no extension
Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill.json doesn't exist
as directory
/usr/src/app/node_modules/promise-polyfill doesn't exist
[/usr/src/app/node_modules/promise-polyfill]
[/usr/src/app/node_modules/promise-polyfill.ts]
[/usr/src/app/node_modules/promise-polyfill.js]
[/usr/src/app/node_modules/promise-polyfill.json]
[/usr/src/app/node_modules/promise-polyfill]
@ ./node_modules/firebase/utils/promise.js 14:76-103
@ ./node_modules/firebase/app/firebase_app.js
@ ./node_modules/firebase/app.js
@ ./node_modules/angularfire2/firebase.app.module.js
@ ./node_modules/angularfire2/index.js
@ ./src/app/app.module.ts
@ ./src/app/main.ts
at new BuildError (/usr/src/app/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at callback (/usr/src/app/node_modules/@ionic/app-scripts/dist/webpack.js:119:28)
at emitRecords.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:269:13)
at Compiler.emitRecords (/usr/src/app/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:368:12)
at next (/usr/src/app/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/usr/src/app/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/usr/src/app/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/usr/src/app/node_modules/webpack/lib/Compiler.js:365:9)
npm info lifecycle agriscoor@0.0.1~build: Failed to exec build script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! agriscoor@0.0.1 build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the agriscoor@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gitlab-runner/.npm/_logs/2017-09-24T18_40_54_728Z-debug.log
/snapshot.sh: line 32: [: missing ]' npm run build failed Make sure your project has a build script in the package.json Failed to upload build to storage please retry your build. Running after script... $ clean-up Cleaning up files... Successful clean up ERROR: Job failed: exit status 1

Tommertom commented Sep 24, 2017

Hi, while the npm install promise-polyfill --save-exact helps with me as well, the upload to Ionic Pro creates a build fail with the same error.

EDIT: fixed issue by adding "promise-polyfill":"6.0.2" to package.json

`
Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
on IonicJS Snapshot Runner (6c67ff43)
Using Shell executor...
Running on ip-10-2-119-255...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/6c67ff43/0/project-1'...
Checking out ab06ea2b as master...
Skipping Git submodules setup
$ fetch-updates
Checking for build process updates...
$ build-app
Fetching build dependencies...
Running: npm install
npm WARN deprecated babili@0.1.2: babili has been renamed to babel-minify. Please update to babel-minify
npm WARN deprecated babel-preset-babili@0.1.4: babili has been renamed to babel-minify. Please update to babel-preset-minify
npm WARN deprecated object-keys@0.2.0: Please update to the latest object-keys

node-sass@4.5.3 install /usr/src/app/node_modules/node-sass
node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-57_binding.node
Download complete
Binary saved to /usr/src/app/node_modules/node-sass/vendor/linux-x64-57/binding.node
Caching binary to /home/gitlab-runner/.npm/node-sass/4.5.3/linux-x64-57_binding.node

uglifyjs-webpack-plugin@0.4.6 postinstall /usr/src/app/node_modules/uglifyjs-webpack-plugin
node lib/post_install.js

node-sass@4.5.3 postinstall /usr/src/app/node_modules/node-sass
node scripts/build.js

Binary found at /usr/src/app/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 800 packages in 69.033s
npm install succeeded
Running: npm run build
npm info it worked if it ends with ok
npm info using npm@5.3.0
npm info using node@v8.2.1
npm info lifecycle agriscoor@0.0.1prebuild: agriscoor@0.0.1
npm info lifecycle agriscoor@0.0.1
build: agriscoor@0.0.1

agriscoor@0.0.1 build /usr/src/app
ionic-app-scripts build

[18:40:33] ionic-app-scripts 2.1.4
[18:40:33] build dev started ...
[18:40:33] clean started ...
[18:40:33] clean finished in 1 ms
[18:40:33] copy started ...
[18:40:33] transpile started ...
[18:40:38] transpile finished in 4.93 s
[18:40:38] preprocess started ...
[18:40:38] deeplinks started ...
[18:40:38] deeplinks finished in 129 ms
[18:40:38] preprocess finished in 131 ms
[18:40:38] webpack started ...
[18:40:39] copy finished in 5.36 s
[18:40:54] ionic-app-script task: "build"
[18:40:54] Error: ./node_modules/firebase/utils/promise.js Module not found: Error: Can't resolve 'promise-polyfill' in
'/usr/src/app/node_modules/firebase/utils' resolve 'promise-polyfill' in
'/usr/src/app/node_modules/firebase/utils' Parsed request is a module using description file:
/usr/src/app/node_modules/firebase/package.json (relative path: ./utils) Field 'browser' doesn't contain a
valid alias configuration after using description file: /usr/src/app/node_modules/firebase/package.json
(relative path: ./utils) resolve as module looking for modules in /usr/src/app/node_modules using
description file: /usr/src/app/package.json (relative path: ./node_modules) Field 'browser' doesn't contain
a valid alias configuration after using description file: /usr/src/app/package.json (relative path:
./node_modules) using description file: /usr/src/app/package.json (relative path:
./node_modules/promise-polyfill) no extension Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill doesn't exist .ts Field 'browser' doesn't contain a valid alias
configuration /usr/src/app/node_modules/promise-polyfill.ts doesn't exist .js Field 'browser' doesn't
contain a valid alias configuration /usr/src/app/node_modules/promise-polyfill.js doesn't exist .json Field
'browser' doesn't contain a valid alias configuration /usr/src/app/node_modules/promise-polyfill.json
doesn't exist as directory /usr/src/app/node_modules/promise-polyfill doesn't exist
[/usr/src/app/node_modules/promise-polyfill] [/usr/src/app/node_modules/promise-polyfill.ts]
[/usr/src/app/node_modules/promise-polyfill.js] [/usr/src/app/node_modules/promise-polyfill.json]
[/usr/src/app/node_modules/promise-polyfill] @ ./node_modules/firebase/utils/promise.js 14:76-103 @
./node_modules/firebase/app/firebase_app.js @ ./node_modules/firebase/app.js @
./node_modules/angularfire2/firebase.app.module.js @ ./node_modules/angularfire2/index.js @
./src/app/app.module.ts @ ./src/app/main.ts
Error: ./node_modules/firebase/utils/promise.js
Module not found: Error: Can't resolve 'promise-polyfill' in '/usr/src/app/node_modules/firebase/utils'
resolve 'promise-polyfill' in '/usr/src/app/node_modules/firebase/utils'
Parsed request is a module
using description file: /usr/src/app/node_modules/firebase/package.json (relative path: ./utils)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /usr/src/app/node_modules/firebase/package.json (relative path: ./utils)
resolve as module
looking for modules in /usr/src/app/node_modules
using description file: /usr/src/app/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /usr/src/app/package.json (relative path: ./node_modules)
using description file: /usr/src/app/package.json (relative path: ./node_modules/promise-polyfill)
no extension
Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/usr/src/app/node_modules/promise-polyfill.json doesn't exist
as directory
/usr/src/app/node_modules/promise-polyfill doesn't exist
[/usr/src/app/node_modules/promise-polyfill]
[/usr/src/app/node_modules/promise-polyfill.ts]
[/usr/src/app/node_modules/promise-polyfill.js]
[/usr/src/app/node_modules/promise-polyfill.json]
[/usr/src/app/node_modules/promise-polyfill]
@ ./node_modules/firebase/utils/promise.js 14:76-103
@ ./node_modules/firebase/app/firebase_app.js
@ ./node_modules/firebase/app.js
@ ./node_modules/angularfire2/firebase.app.module.js
@ ./node_modules/angularfire2/index.js
@ ./src/app/app.module.ts
@ ./src/app/main.ts
at new BuildError (/usr/src/app/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at callback (/usr/src/app/node_modules/@ionic/app-scripts/dist/webpack.js:119:28)
at emitRecords.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:269:13)
at Compiler.emitRecords (/usr/src/app/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/usr/src/app/node_modules/webpack/lib/Compiler.js:368:12)
at next (/usr/src/app/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/usr/src/app/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/usr/src/app/node_modules/tapable/lib/Tapable.js:222:13)
at Compiler.afterEmit (/usr/src/app/node_modules/webpack/lib/Compiler.js:365:9)
npm info lifecycle agriscoor@0.0.1~build: Failed to exec build script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! agriscoor@0.0.1 build: ionic-app-scripts build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the agriscoor@0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gitlab-runner/.npm/_logs/2017-09-24T18_40_54_728Z-debug.log
/snapshot.sh: line 32: [: missing ]' npm run build failed Make sure your project has a build script in the package.json Failed to upload build to storage please retry your build. Running after script... $ clean-up Cleaning up files... Successful clean up ERROR: Job failed: exit status 1

@apatnaik93

This comment has been minimized.

Show comment
Hide comment
@apatnaik93

apatnaik93 Oct 4, 2017

Worked for me Thanks @mcorrigan.

apatnaik93 commented Oct 4, 2017

Worked for me Thanks @mcorrigan.

@Rizwan964

This comment has been minimized.

Show comment
Hide comment
@Rizwan964

Rizwan964 Nov 5, 2017

Yes that woked for me thanks.

Rizwan964 commented Nov 5, 2017

Yes that woked for me thanks.

@medialnk

This comment has been minimized.

Show comment
Hide comment
@medialnk

medialnk Nov 11, 2017

@mcorrigan thanks! That solved the problem for me as well and now I can successfully build ios again.

medialnk commented Nov 11, 2017

@mcorrigan thanks! That solved the problem for me as well and now I can successfully build ios again.

@franzisk

This comment has been minimized.

Show comment
Hide comment
@franzisk

franzisk Mar 14, 2018

Nothing seems to work for me, getting:

Error: ./src/app/app.module.ngfactory.ts
Module not found: Error: Can't resolve '../../angularfire2/auth' in '/Users/francisco/Projetos-Ionic/Jungery/src/app'
resolve '../../angularfire2/auth' in '/Users/francisco/Projetos-Ionic/Jungery/src/app'
  using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./src/app)
    using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./angularfire2/auth)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.json doesn't exist
      as directory
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth doesn't exist
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.ts]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.js]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.json]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth]
 @ ./src/app/app.module.ngfactory.ts 28:0-51
 @ ./src/app/main.ts,./src/app/app.module.ngfactory.ts
Module not found: Error: Can't resolve '../../angularfire2/database' in '/Users/francisco/Projetos-Ionic/Jungery/src/app'
resolve '../../angularfire2/database' in '/Users/francisco/Projetos-Ionic/Jungery/src/app'
  using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./src/app)
    using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./angularfire2/database)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.json doesn't exist
      as directory
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database doesn't exist
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.ts]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.js]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.json]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database]
 @ ./src/app/app.module.ngfactory.ts 27:0-55
 @ ./src/app/main.ts
    at new BuildError (/Users/francisco/Projetos-Ionic/Jungery/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at callback (/Users/francisco/Projetos-Ionic/Jungery/node_modules/@ionic/app-scripts/dist/webpack.js:121:28)
    at emitRecords.err (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:269:13)
    at Compiler.emitRecords (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:375:38)
    at emitAssets.err (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:262:10)
    at applyPluginsAsyncSeries1.err (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/Users/francisco/Projetos-Ionic/Jungery/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.compiler.plugin (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at Compiler.applyPluginsAsyncSeries1 (/Users/francisco/Projetos-Ionic/Jungery/node_modules/tapable/lib/Tapable.js:222:13)
    at Compiler.afterEmit (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:365:9)

My environment:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 6.5.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.3.0 ios 4.4.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.1
    ios-sim    : 5.0.12
    Node       : v7.0.0
    npm        : 5.3.0
    OS         : macOS High Sierra
    Xcode      : Xcode 9.2 Build version 9C40b

The error above occurs still after running:
% npm install promise-polyfill --save-exact

Any other clue?

franzisk commented Mar 14, 2018

Nothing seems to work for me, getting:

Error: ./src/app/app.module.ngfactory.ts
Module not found: Error: Can't resolve '../../angularfire2/auth' in '/Users/francisco/Projetos-Ionic/Jungery/src/app'
resolve '../../angularfire2/auth' in '/Users/francisco/Projetos-Ionic/Jungery/src/app'
  using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./src/app)
    using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./angularfire2/auth)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.json doesn't exist
      as directory
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth doesn't exist
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.ts]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.js]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth.json]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/auth]
 @ ./src/app/app.module.ngfactory.ts 28:0-51
 @ ./src/app/main.ts,./src/app/app.module.ngfactory.ts
Module not found: Error: Can't resolve '../../angularfire2/database' in '/Users/francisco/Projetos-Ionic/Jungery/src/app'
resolve '../../angularfire2/database' in '/Users/francisco/Projetos-Ionic/Jungery/src/app'
  using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./src/app)
    using description file: /Users/francisco/Projetos-Ionic/Jungery/package.json (relative path: ./angularfire2/database)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.json doesn't exist
      as directory
        /Users/francisco/Projetos-Ionic/Jungery/angularfire2/database doesn't exist
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.ts]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.js]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database.json]
[/Users/francisco/Projetos-Ionic/Jungery/angularfire2/database]
 @ ./src/app/app.module.ngfactory.ts 27:0-55
 @ ./src/app/main.ts
    at new BuildError (/Users/francisco/Projetos-Ionic/Jungery/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at callback (/Users/francisco/Projetos-Ionic/Jungery/node_modules/@ionic/app-scripts/dist/webpack.js:121:28)
    at emitRecords.err (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:269:13)
    at Compiler.emitRecords (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:375:38)
    at emitAssets.err (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:262:10)
    at applyPluginsAsyncSeries1.err (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:368:12)
    at next (/Users/francisco/Projetos-Ionic/Jungery/node_modules/tapable/lib/Tapable.js:218:11)
    at Compiler.compiler.plugin (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
    at Compiler.applyPluginsAsyncSeries1 (/Users/francisco/Projetos-Ionic/Jungery/node_modules/tapable/lib/Tapable.js:222:13)
    at Compiler.afterEmit (/Users/francisco/Projetos-Ionic/Jungery/node_modules/webpack/lib/Compiler.js:365:9)

My environment:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 6.5.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.3.0 ios 4.4.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.1
    ios-sim    : 5.0.12
    Node       : v7.0.0
    npm        : 5.3.0
    OS         : macOS High Sierra
    Xcode      : Xcode 9.2 Build version 9C40b

The error above occurs still after running:
% npm install promise-polyfill --save-exact

Any other clue?

@kehkashan22

This comment has been minimized.

Show comment
Hide comment
@kehkashan22

kehkashan22 May 15, 2018

@franzisk same here, i have trying to get my app out there, but ionic just wont build with the --prod flag. Any resolutions to this issue yet?

kehkashan22 commented May 15, 2018

@franzisk same here, i have trying to get my app out there, but ionic just wont build with the --prod flag. Any resolutions to this issue yet?

@franzisk

This comment has been minimized.

Show comment
Hide comment
@franzisk

franzisk May 16, 2018

I am sorry @kehkashan22 but I don't remember how I solved this, but I can show you my list of plugins and the version of everything, I think that something you must check is all plugin version (update them), the cordova version used on the project and the platform version.

Here are meine:
Cordova plugins (% cordova plugin list):

com.googlemaps.ios 2.5.0 "Google Maps SDK for iOS"
com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions"
cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-googleplus 5.2.3 "Google SignIn"
cordova-plugin-linkedin 1.2.1 "LinkedIn"
cordova-plugin-mauron85-background-geolocation 2.3.2 "CDVBackgroundGeolocation"
cordova-plugin-nativegeocoder 2.0.4 "NativeGeocoder"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-swift-support 3.1.1 "SwiftSupport"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-sqlite-storage 0.7.14 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 7.0.1 "BarcodeScanner"
phonegap-plugin-push 2.1.2 "PushPlugin"
twitter-connect-plugin 0.6.0 "Twitter Connect"

Ionic Info:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 6.3.0 browser 5.0.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.1
    Node       : v7.0.0
    npm        : 5.3.0
    OS         : macOS High Sierra
    Xcode      : Xcode 9.3.1 Build version 9E501

Also, try just a:
% sudo cordova compile android

franzisk commented May 16, 2018

I am sorry @kehkashan22 but I don't remember how I solved this, but I can show you my list of plugins and the version of everything, I think that something you must check is all plugin version (update them), the cordova version used on the project and the platform version.

Here are meine:
Cordova plugins (% cordova plugin list):

com.googlemaps.ios 2.5.0 "Google Maps SDK for iOS"
com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions"
cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-googleplus 5.2.3 "Google SignIn"
cordova-plugin-linkedin 1.2.1 "LinkedIn"
cordova-plugin-mauron85-background-geolocation 2.3.2 "CDVBackgroundGeolocation"
cordova-plugin-nativegeocoder 2.0.4 "NativeGeocoder"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-swift-support 3.1.1 "SwiftSupport"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-sqlite-storage 0.7.14 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 7.0.1 "BarcodeScanner"
phonegap-plugin-push 2.1.2 "PushPlugin"
twitter-connect-plugin 0.6.0 "Twitter Connect"

Ionic Info:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 6.3.0 browser 5.0.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.1
    Node       : v7.0.0
    npm        : 5.3.0
    OS         : macOS High Sierra
    Xcode      : Xcode 9.3.1 Build version 9E501

Also, try just a:
% sudo cordova compile android

javascript-framework-gls pushed a commit to javascript-framework-gls/Angular-Firebase that referenced this issue Jul 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment