From 665491e72b9a454c8552f517fc6cfb1f7b2ceef8 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Tue, 20 Sep 2022 06:40:03 -0700 Subject: [PATCH] Docs: LP1863921 max-old-space-size param when building angular Signed-off-by: Jane Sandberg Signed-off-by: Andrea Buntz Neiman --- docs/modules/installation/pages/server_installation.adoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/modules/installation/pages/server_installation.adoc b/docs/modules/installation/pages/server_installation.adoc index 259910b9b4..da3d87cc09 100644 --- a/docs/modules/installation/pages/server_installation.adoc +++ b/docs/modules/installation/pages/server_installation.adoc @@ -178,7 +178,18 @@ npm install # fetch JS dependencies + [source,sh] ------------------------------------------------------------------------------ -ng build --prod +ng build --configuration=production +------------------------------------------------------------------------------ ++ +This can be a memory-intensive build. If the process does not finish, and you +get the message "Killed" in the console, try running it with +https://nodejs.org/api/cli.html#cli_max_old_space_size_size_in_megabytes[an explicit max-old-space-size option] +to encourage more garbage collection. For example, on a machine with 4GB of +memory, you can limit max-old-space-size to 3GB with: ++ +[source,sh] +------------------------------------------------------------------------------ +NODE_OPTIONS=--max-old-space-size=3072 ng build --configuration=production ------------------------------------------------------------------------------ + 4. OPTIONAL: Test eg2 web client code if the -developer packages and -- 2.11.0