You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on May 1, 2020. It is now read-only.
[18:53:55] build dev finished in 11.11s 454M/513M
[18:54:12] bundle dev update finished in 4.67s 865M/920M
[18:54:19] bundle dev update finished in 4.44s 675M/734M
[18:54:28] bundle dev update finished in 5.31s 708M/799M
[18:54:36] bundle dev update finished in 4.97s 786M/987M
[18:54:43] bundle dev update finished in 5.05s 884M/1063M
[18:54:52] bundle dev update finished in 5.32s 975M/1158M
[18:54:59] bundle dev update finished in 5.17s 1068M/1211M
[18:55:08] bundle dev update finished in 5.38s 1177M/1318M
[18:55:20] bundle dev update finished in 6.30s 1242M/1422M
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
I hope there will be some sort of solution soon, It is really annoying since it slows down development/loading significantly compared to beta 11. Does it have to do with the way rollup is bundling in General ? Because up to now there is not a fix, and most have this problem.
I think the bundleCache global in bundle.ts is not freed because it's captured by the clearCachedModule function. I would suggest removing that function altogether (works for me) but I'm not entirely clear what runTemplateUpdate is doing so I'll stop my investigation here.
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.
@jgw96 Everywhere you closed this issue! Have you found any solution for this (FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory) error?
Activity
mirkonasato commentedon Oct 4, 2016
Still having the same problem with
ionic-app-scripts 0.0.28.All I'm doing is starting
ionic serveon a project generated withionic start, and editing files as normal. After about 10 rebuilds I getMore details:
mirkonasato commentedon Oct 4, 2016
Same with Node v6.7.0, just with a slightly different stack trace:
Again all I'm doing is editing an html template adding a removing a space about 10 times before it runs out of memory.
mirkonasato commentedon Oct 4, 2016
Logging
heapUsed/heapTotalfrom process.memoryUsage():mirkonasato commentedon Oct 4, 2016
The memory leak seems related to the bundleCache. Commenting out that line fixes the out of memory for me, even though the build is a bit slower now.
By the way, this article is pretty interesting: Understanding Garbage Collection and hunting Memory Leaks in Node.js.
storatus commentedon Oct 4, 2016
I hope there will be some sort of solution soon, It is really annoying since it slows down development/loading significantly compared to beta 11. Does it have to do with the way rollup is bundling in General ? Because up to now there is not a fix, and most have this problem.
mirkonasato commentedon Oct 4, 2016
I think the
bundleCacheglobal inbundle.tsis not freed because it's captured by theclearCachedModulefunction. I would suggest removing that function altogether (works for me) but I'm not entirely clear whatrunTemplateUpdateis doing so I'll stop my investigation here.jgw96 commentedon Oct 4, 2016
Hello! Thanks for all the info! I am going to close this issue as a duplicate of #64. Thanks!
timothybclayton commentedon Jul 7, 2017
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" (
"%~dp0\node.exe" --max_old_space_size=8048 "%~dp0\node_modules\ionic\bin\ionic" %*
) ELSE (
@SETLOCAL
@set PATHEXT=%PATHEXT:;.JS;=;%
node --max_old_space_size=8048 "%~dp0\node_modules\ionic\bin\ionic" %*
)
Good luck!
AnkitMaheshwariIn commentedon Jul 9, 2017
@jgw96 Everywhere you closed this issue! Have you found any solution for this (FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory) error?