Ionic build freezes -- how do I tell why?

Hi all,

I’m new to ionic development, and I’ve inherited an ionic 3 app that I’m supposed to work on.

I’m trying to build the app and here is what I’m seeing:

F:\PROJECTS\GT\jeffWorking\mobile-master>ionic build
Running app-scripts build:
[19:30:54] build dev started …
[19:30:54] clean started …
[19:30:54] clean finished in 20 ms
[19:30:54] copy started …
[19:30:57] deeplinks started …
[19:30:57] deeplinks finished in 140 ms
[19:30:57] transpile started …
[19:31:07] transpile finished in 10.62 s
[19:31:07] preprocess started …
[19:31:07] preprocess finished in 4 ms
[19:31:07] webpack started …
[19:31:08] copy finished in 13.43 s
[19:31:14] webpack finished in 6.18 s
[19:31:14] sass started …
Without from option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning.
[19:31:15] autoprefixer: :24266:3: Replace fill-available to stretch, because spec had been changed
[19:31:15] autoprefixer: :24272:3: Replace fill-available to stretch, because spec had been changed
[19:31:15] autoprefixer: :24277:3: Replace fill-available to stretch, because spec had been changed
[19:31:15] sass finished in 1.80 s
[19:31:15] postprocess started …
[19:31:15] postprocess finished in 17 ms
[19:31:15] lint started …
[19:31:15] build dev finished in 21.29 s
ionic cordova prepare --no-build
cordova prepare
Android Studio project detected

And it hangs there forever…

Is there some way to tell what it’s hanging on, such as a build log or something?

Some common solutions
1.Remove and Add cordova
2.Remove and Add android platform / ios platform
3.Check gradle downloading or not because sometimes firewall preventing it to downlaod
4.Try not to use most recent versions of libraries. Use one version below
5.Try to do it in new fresh project

Hope it helps

Thank you for the help.

I’ve been going through your list.

I’m not exactly sure what you mean by step 4 – when you say “librarys” do you men the packages as described in my package.json.

Anyway, I uninstalled and reinstalled cordova, removed and added the android platforn, and checked that our firewall is not blocking the gradle download sute.

It still locks up (although in a different place in the build.)

Then I tried staring a new project and even that locked up.

F:\PROJECTS\LGT\jeffWorking>ionic start TestPrj

? What starter would you like to use: tabs

And it locked up.

Any other ideas out there?

I also tried rebooting my system.

Does anybody have any other ideas?

I’m beginning to think that I messed up the install somewhere along the way, so I’m going to uninstall everything and then reinstall everything from scratch.

1 Like

I’m not exactly sure what you mean by step 4 – when you say “librarys” do you men the packages as described in my package.json.

Yes thats what I mean.
Sometimes most recent versions not working perfectly that time

I uninstalled and re-installed everything. Still no luck. I’m going to try dropping back to cordova@8.1.2

Try running cordova clean, then build again.
If it still hangs, run npm outdated to see if there’s any outdated plugins causing it to hang.
Run npm i to install any missing plugins.
You could also delete the /node_modules/ folder, then run npm i again to install it back.

Good luck.

I tried all that, but I didn’t update any of the outdated modules because I am intentionally need to be on Ionic 3 for this project.

Still no luck.

I guess I’m down to debugging the Ionic 3 source code.

I got it working by switching from version 10 of node.js to verrsion 9.

Thanks for the help obinnae.

1 Like