-
Notifications
You must be signed in to change notification settings - Fork 311
Ionic build --prod freezes after webpack started, copy finished... #1426
Comments
+1 here, tried to add max_old_space_size parameter, upgrade @ angular-devkit/build-optimizer, |
I'm facing the same issue. Wasted days on trying to build with Unfortunately, the README.md of this repo appears to be a bit outdated and not very helpful. The @Bengejd, @ayaka209, If you also can't sort out the Basically, instead of this Would be great to find out why exactly |
@bnfrnz thank you. but --aot --minifyjs --minifycss --release also takes much time on webpack. ( 400s ) I write a webpack.config.js and force it use ionic dev config for prod now: (./config/webpack.config.js)
then it takes 80s (--prod) instead of 2000s+ (--prod without any change) ( do not forget to add config to package.json )
just a workaround. my app takes 30s+ on startup if I don't use aot. |
@bnfrnz thanks for the tip, I tried it just now, and it seems to be running the build as it's supposed to. Kind of a bummer that it doesn't work with --prod, but oh well. Best regards! |
Whaat @ayaka209 if you do this you will get JUST DEV so no need to run --prod argument :D whats the purpose ? I have the same problem like you i try to put heap size on node more than 12 GB and Ionic consume all of it... but the build didn't succeed.... |
@Stradivario benefit from aot and less build time than --aot |
@ayaka209 i am sure you are talking about "benefit from --prod" AOT - Ahead of Time Compilation (remove all unused imports) My suggestion is try to use both --aot and --prod this will give you faster load of your application. Regards, |
@Stradivario no, just aot. after replacing webpack config, concat, minify uglify is not done. they spend too much time.. |
+1 |
1 similar comment
+1 |
@bnfrnz I really owe you a beer. I can't thank you enough for this workaround. I have a project of about 20+ lazy loaded pages and had this issue using Thanks again! |
+1 |
1 similar comment
+1 |
I was able to get the live deploy working by editing the package.json script (following the previous mentioned fix) like this :
However I would feel much better when a fix comes and I can just put back the normal --prod setup |
+1 |
any update fix this issue? what is the benefit using this : if we compare with --prod? |
The only difference is that we are not utilizing the “optimizeJs” flag,
which prod adds to the flags you specified below. Otherwise, —prod sets all
of your mentioned flags, plus optimizeJs.
Jordan
On May 17, 2018 at 8:29 PM, freddi Andrew <[email protected]> wrote:
any update fix this issue?
i still can`t build with --prod.
what is the benefit using this :
"build": "ionic-app-scripts build --aot --minifyjs --minifycss --release",
if we compare with --prod?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1426 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALLhVYrKX31NO0-MWZswLtjV9hiYxcXTks5tzhXTgaJpZM4TuudN>
.
|
I had the same problem yesterday. After several month of development --prod builds stopped without any error message. Last message was: After hours of looking for the problem, I've found this in C:\Users\user.ionic\daemon.log: [ERROR] [2018-05-18T19:40:46.800Z] Could not get latest version of ionic. After I've fixed the connection to my internal npm repo, it works again. Now log says: [2018-05-19T07:51:43.216Z] Writing 7432 to daemon pid file (.\daemon.pid). I understand that my situation with internal npm proxy is not usual, but the point is that it is not always related to memory handling. |
+1 |
Who are getting the --prod freeze are using googlemaps too? I beleave that this problem is related with googlemaps. |
Hello, I have a solution. function getProdLoaders() {
if (process.env.IONIC_OPTIMIZE_JS === 'true') {
//return optimizedProdLoaders; <==
}
return devConfig.module.loaders;
} in |
This issue begin after [email protected] & 4.13.1 This issue is on their github |
@GuilhermeBCC, I suspect what you're doing there is just a complicated approach to omitting the flag @mfahrul, thanks so much for referencing the issue from the firebase-js-sdk repo. This finally did the trick for me. Been fighting this for weeks. For everyone who is using Firebase Realtime Database in their project, I highly recommend pinning your version to I have no idea what updates have been made to @ze-termica, I'm not using googlemaps but it may still cause the problem in your case. Google's typings and libs are all over the place, unfortunately. Maybe try downgrading it as well and see if the issue was introduced in a recent version, as it happened in the case of firebase. |
Firebase again. Firebase is a headache. @bnfrnz Do you think it best to omit the flag --prod and send it to production ?? |
@GuilhermeBCC |
+1 |
Aah..
Sorry you have different issue than mine i guess.
…On Sat 14 Jul, 2018, 7:16 PM Ben, ***@***.***> wrote:
Thanks @dharapvj <https://github.com/dharapvj>. Unfortunately it doesn't
do the trick in my case.
I pinned down the exact module that seems to be causing the freeze for me.
It's any version higher than @***@***.*** and there are
plenty of other developers with that issue. Firebase is a great suite of
products. I'm a fan. But when it comes to dependencies and typings it's
quite frustrating. Every update breaks something. I wonder if there's some
sort of ES import issue or circle reference or so. Unfortunately they
looked into it and concluded that the issue is probably on Ionic's side
<firebase/firebase-js-sdk#714 (comment)>
.
Basically, I can't build any Firebase project with --prod flag anymore.
All I can do is use --aot --uglifyjs --minifyjs --minifycss --release and
hope that someone will eventually fix whatever is going wrong...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1426 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB1Pntmq2qmnKxrFIDSBpCTI4Y3bBGaVks5uGidqgaJpZM4TuudN>
.
|
Same issue. If you want to look into my source code, you can download here: https://goo.gl/bpdtfk (I explained my issue in detail here: https://forum.ionicframework.com/t/ionic-build-freezes-after-copy-finished-in/135640 |
@everyone: Updating |
I have updated the app-scripts,web pack,angular 4 to 6 but still the problem persist. |
@saryuvc Did you just update app-scripts and not update the version of the angular-devkit/build-optimizer that it leverages? |
yes i have updated the app scripts from 3.1.0 to 3.1.11. |
@saryuvc That wouldn't update the build-optimizer though. You have to update that in the ionic-script's package.json itself and npm install @angular-devkit/build-optimizer |
ok let me try..thank you for reply |
Hello @jayordway i have updated the angular-devkit/build-optimizer in ionic-script's package.json and app's package.json. the build time is approximate 1 hour and 35 min from 2.5 hour.please note i have 30 up different modules with different pages.i have removed all the modules and with centralised module the prod release build time is 4 mins. so i think it is a issue of lazy loaded page. also , M not using firebase. any solution ? please help me for same This is my package.json"dependencies": { |
So I opened this issue 84 days ago, and we still haven't had it addressed by the Ionic team, unfortunately. Running the following works (for me anyways). This seems to be an issue with large apps with multiple modules (as one would want for lazy loading purposes) as mentioned here, and
After running these commands, it finishes the
Just for continuity, here is my
|
Hi, When I run my application with ionic serve --lab freeze it like that message |
@sameer05k21a0440 please post your package.json file so we can see what you are running. Did you follow the steps I listed above, and then it began freezing, or is this a seperate issue? If it is, I recommend opening a new issue, because the two are not linked (to my knowledge), though I haven't used |
I am stuck here, looks like same issue, can some one point to a solution that works
Ionic info
|
For me this worked
and takes 30 mins on MAC Book Pro :) good luck if you are on windows :) |
Just downgrade to [email protected]. This fix the problem for me. |
Hello, Please remove www folder,node modules,platforms, and npm install please note : I have updated to ionic 4 and cordova 8. this solved my issue. |
Tks @germanriverahdez, your solution works for me |
Yep doing npm install latest versions of webpack and build-optimizer seems to be fixing the problem with firebase's libs |
It would be nice to see something from Ionic on this and other V3 related issues. Maybe an update to ionic-app-scripts or a path to use the angular-cli for v3 projects. I've been following many issues, some even with PRs but they seem to get no attention since all of the focus is on V4. It's unfortunate, because event after the V4 there will be a large portion of the community that will not be able to migrate to V4 even once it's officially released, at least for a period of time. When AngularJS went towards Angular 2 they announced a plan to monitor the community and provide support for AngularJS until Angular 2 hit a certain adoption rate IIRC. |
Some hints to notify eveybody,
then, you can compile as usual
|
Downgrade solution didn't works for me. This one works for me : Thanks to @bnfrnz |
@mfahrul thanks for the help. Working |
This is the most effective answer till today. I confirm |
Short description of the problem:
When running
ionic cordova build ios --prod
the command starts running, but then (seemingly) stops afterWhat behavior are you expecting?
For the build process to continue, like it does when you run
ionic cordova build ios
Steps to reproduce:
Package.Json
Which @ionic/app-scripts version are you using?
3.1.9
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
This was seemingly fixed in the 3.1.9 update of @ionic/app-scripts. But I'm still running into this issue after upgrading from 3.1.8.
The text was updated successfully, but these errors were encountered: