From 539686b61e14c627fb2de78958bc654d9048f9c1 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 e7534d0278..8109aed6a3 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