-
Notifications
You must be signed in to change notification settings - Fork 311
Allocation failed - JavaScript heap out of memory #64
Comments
Hello @chack would you mind running |
@chack If you don't add the |
Ran into this using 0.0.28:
|
Can confirm this as well for 0.0.28 |
To summarise my comments on #85, this patch fixes it for me: https://gist.github.com/mirkonasato/903e039bf341707776c402497afc25bb |
Can confirm this as well for 0.0.28 Error:
Happens around the 5th watch code update. |
+1, happens to me too on both 0.0.27 and 0.0.28 Node 6.7.0 |
Confirm, happens to me as well on 0.0.28.
|
+1 |
@adamdbradley Does the flag |
@lleevvyy yes it does, see my comment above |
@chack Ok, thanks. |
@lleevvyy for clarification: you have to paste it into the package.json as is wrote in the comment and not as flag in the terminal. Then you can clearly see the benefit. If you run serve too long it will get the error still sometimes :( but a lot less! |
There's a memory leak, raising the max size will only delay the limit being reached. The solution is removing the leak. |
@adamdbradley @jgw96 Any progress about this issue? It is really hard to work with Ionic 2 while this problem exists. @mirkonasato /offtopic Your udemy Ionic series is amazing. Do you plan to release another one for Ionic 2? /offtopic |
Hello everyone! We are actively working on this issue and I am happy to report that I am testing the latest master right now and it seems to be fixed for good this time 😃 . Ive also added some debug logging of the memory usage so that we can keep an eye on this in the future. |
When this will be available for us? Should we just reinstall the node_modules, or some other changes are required? |
We are working hard to get a new release out asap. Thanks! |
Hello everyone! We just release v0.0.29 of app-scripts which fixes this memory leak. To update simply run |
Haven't been able to test out the garbage collection/memory error on v0.0.29 yet because Tippex found an error in one of my components and breaks the dev build.
That component passes the Atom Typescript linter just fine and that component was running perfect prior to upgrading to v0.0.29 (was on v0.0.23 prior, I believe). Anyone else see something similar? |
I'm running into invalid compilation errors as well, only since v0.0.29.
Reverting to v0.0.28 gets me running again. Back to the out of memory errors for now I guess! |
I deleted the old node_modules, and reinstalled them again. app-scripts are now 0.0.29. The build time on the live reload takes around 10 secs, the ionic build takes around 70 secs. All seems fine, no memory errors. |
I can confirm I no longer get the out of memory error. Memory usage increases and updates get slower at first, but after 10 updates or so it somehow stabilises: pastebin.com/kpJcUGMG |
Thanks for all the testing everyone! @TheBrockEllis So its possible that this is a bug in tippex, but its also possible that its a bug in the typescript plugin in atom. Does tsc throw an error about that component? Also, if you have vscode installed you can check your component there too. The Atom typescript plugin can be a little weird sometimes, but from my experience vscode is more reliable when it comes to type checking etc. Could you share a repo that includes the code that is causing the error? @Manduro Could you share the code that is causing the error? @mirkonasato This seems normal. Its more memory usage than im seeing on my machine with my project, but your project may be bigger. It is normal for memory usage to climb at first and then stabilize. |
@jgw96 color me ashamed. My error had nothing to do with Tippex or the new release of the app-scripts. I found a stray backtick (`)in my template HTML file when starting to create an isolated repo to share. Removing that small little typo fixed everything. I'll report back with my experience with v0.0.29. Thanks! |
@Manduro can you try renaming your definitions file to definitions.d.ts? |
With the update of app-scripts to 0.0.29 my interface exports don't work anymore. And import it in a page like src/pages/data/view.ts: Now I get the error:
Has the use of interface exports in Typescript changed (I started with Ionic-beta 8) and this error occurs now just because of some different option in app-scripts? |
@jgw96 Exact same here as @10freefingers. Sorry for the confusing filename, but my |
Same issue as @10freefingers and @Manduro exporting interfaces with app-scripts 0.0.30. |
Same issue here with broken interfaces. Downgraded to 0.0.28 in the meantime. |
Hello all! I am going to close this issue for now as this specific memory issue has been fixed in v0.0.30. Just for full disclosure, there is another memory issue that is being actively worked on, and that 0.0.31 should go towards fixing. Thanks everyone! |
Hey @jgw96, still seeing this, can't really find steps to reproduce it - happens accidentally after some changes in the code while running
my env is:
|
Hey @jgw96 I am also facing the same issue. Below is the my package.json { |
I've was able to workaround this issue on Ionic v3.5, Ionic cli 3.4.0, and Node.js 6.9.1. We have a big app with lots of modules and heap space errors occurring every build, whether "ionic serve", or "ionic cordova run --prod". Modify your ionic.cmd file in C:\Users<user>\AppData\Roaming\npm by adding --max_old_space_size. I set mine to 8096. @if EXIST "%~dp0\node.exe" ( Good luck! |
@timothybclayton You've saved my friday. Thanks a lot! |
Does anyone know how to increase the node memory in OSX? |
Thanks it's working |
Does anyone know how to increase the node memory in OSX? |
@bigthing33 hey mate this worked for me:
Note if you still have out of memory issues, try increasing the ram further. I currently have it at 12228 as I have a big app. Best of luck! |
ok how is this still an issue after 2 years. I am still getting this error. I tried what @bkarv said but then i get "#FailureMessage Object: 0x7febe7443950Illegal instruction (core dumped)"
global packages:
local packages:
System:
Environment Variables:
Misc:
` |
@timothybclayton how to do it in linux |
also running into this on linux on node 10.9 ionic cli 4.1.2
when running |
can we all agree that the solution to getting a production build with ionic is not to just let some crazy memory leak go all the way to 4-8GB for building a >1MB web application? |
Ionic Serve runs without problems, but Ionic run iOS gives me this:
I already updated to app-scripts 0.0.27 to get #44
The text was updated successfully, but these errors were encountered: