Docs: LP1863921 max-old-space-size param when building angular
authorJane Sandberg <sandbergja@gmail.com>
Tue, 20 Sep 2022 13:40:03 +0000 (06:40 -0700)
committerAndrea Buntz Neiman <abneiman@equinoxinitiative.org>
Wed, 8 Mar 2023 21:07:59 +0000 (16:07 -0500)
Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Signed-off-by: Andrea Buntz Neiman <abneiman@equinoxinitiative.org>
docs/modules/installation/pages/server_installation.adoc

index e7534d0..8109aed 100644 (file)
@@ -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 <osname>-developer packages and