I am having an out of memory problem with running a build of an Ionic application with --release
and --prod
flag. Unfortunately, as it seams, the space of memory that Node is allowed to use is not sufficient for the process and it's producing the following error (probably after no memory blocks are available to carry out the operation):
As suggested in this answer, I tried to exploit the max_old_space_size
flag from the package.json
start
script before the build command to no avail. Mainly because the node process is run internally by the Ionic CLI way after the flag is set.
I also tried to re-install Ionic with a bigger heap size as suggested in this answer, but that seems to only address memory limitations during installation of the Ionic package itself, and not any subsequent operations with Ionic via the CLI.
Thanks in advance for any help. :)
Ionic Info:
cli packages: (D:\ionic\<...>\node_modules)
@ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 7.0.1
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3 ios 4.5.0
Ionic Framework : ionic-angular 3.3.0
System:
Android SDK Tools : 25.2.2
Node : v6.10.2
npm : 4.0.5
OS : Windows 7