hey all ,
when i trying to build my project to production and release version i got this error
<--- Last few GCs --->
[10840:0000028F2F526150] 118866 ms: Mark-sweep 1406.8 (1451.8) -> 1406.8 (1451.8) MB, 1822.4 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0000031D97EA5EE1 <JSObject>
1: symbolToParameterDeclaration(aka symbolToParameterDeclaration) [F:\Work\Applications\ionic\TucTop\node_modules\@angular-devkit\build-optimizer\node_modules\typescript\lib\typescript.js:~26283] [pc=00000304E2B39E2A](this=000001FBDD402311 <undefined>,parameterSymbol=00000078EBE60B01 <SymbolObject map = 000003BBC6CBB301>,context=000002429F376121 <Object map = 000003BBC6CD8311>)
2: /* a...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
PS F:\Work\Applications\ionic\TucTop> npm run ionic:build --prod
> TucTop@0.0.1 ionic:build F:\Work\Applications\ionic\TucTop
> node --max-old-space-size=8192 --stack-size=1968 node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build
i found that i must increase max-old-space-size
so in my package.json
"scripts": {
"ionic:build": "node --max-old-space-size=8192 --stack-size=1968 node_modules/@ionic/app-scripts/bin/ionic-app-scripts.js build"
},
and run
npm run ionic:build --prod
but now the build stuck in the [01:18:43] copy finished in 15.58 s
but i’m noticed that the nodeJs server taking up to 7gb from memory and this is a picture from my task manger
and until now nothing happen
my ionic info
cli packages: (C:\Users\Yousef Rabie Khalil\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.5
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 25.2.5
Node : v8.9.3
npm : 6.0.0
OS : Windows 10
any help in this please ?