Skip to content

Commit 58c3de8

Browse files
build: increase Node.js heap size in CircleCI config to 6GB (#6334)
* build: increase Node.js heap size in CircleCI configuration to 6GB * build: increase Node.js heap size to 6GB in build script * build: add logging for NODE_OPTIONS and V8 heap limit in build script * build: use consistent variable names for NODE_OPTIONS
1 parent 3dc6e2d commit 58c3de8

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- image: cimg/node:14.21.3-browsers
5252
resource_class: large
5353
environment:
54-
NODE_OPTIONS: '--max_old_space_size=3584'
54+
NODE_OPTIONS: '--max-old-space-size=6144'
5555
steps:
5656
- checkout
5757
- install-deps
@@ -79,7 +79,7 @@ jobs:
7979
- image: cimg/node:14.21.3-browsers
8080
resource_class: large
8181
environment:
82-
NODE_OPTIONS: '--max_old_space_size=3584'
82+
NODE_OPTIONS: '--max-old-space-size=6144'
8383
steps:
8484
- checkout
8585
- install-deps

packages/@okta/vuepress-site/.vuepress/scripts/build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/sh
2-
export NODE_OPTIONS="--max-old-space-size=4096"
2+
echo "[build.sh] NODE_OPTIONS inherited from environment: '${NODE_OPTIONS}'"
3+
export NODE_OPTIONS="${NODE_OPTIONS:-"--max-old-space-size=6144"}"
4+
echo "[build.sh] NODE_OPTIONS in effect: '${NODE_OPTIONS}'"
5+
node -e "console.log('[build.sh] effective V8 heap limit (MB):', Math.round(require('v8').getHeapStatistics().heap_size_limit/1024/1024))"
36
export BUILD_WORKER_THREADS="${BUILD_WORKER_THREADS:-2}"
47
cp .vuepress/scripts/updateBuildScript.js ../../../node_modules/@vuepress/core/lib/node/build/index.js
58
cp .vuepress/scripts/addWorkerScript.js ../../../node_modules/@vuepress/core/lib/node/build/worker.js

0 commit comments

Comments
 (0)