From 0ff80b60d8754a16b863c1efdffcd319d0af68ed Mon Sep 17 00:00:00 2001 From: j4k0xb <55899582+j4k0xb@users.noreply.github.com> Date: Sun, 22 Sep 2024 20:53:09 +0200 Subject: [PATCH] docs: add windows cmd script for NODE_OPTIONS --- apps/docs/src/guide/common-errors.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/apps/docs/src/guide/common-errors.md b/apps/docs/src/guide/common-errors.md index 882be8b0..ebeb593f 100644 --- a/apps/docs/src/guide/common-errors.md +++ b/apps/docs/src/guide/common-errors.md @@ -14,10 +14,19 @@ To fix this, run `npm rebuild isolated-vm` in your project directory or delete t For Node 20.x and above, disabling snapshots may be necessary: -```sh +::: code-group + +```sh [Windows] +set NODE_OPTIONS=--no-node-snapshot +webcrack input.js +``` + +```sh [Linux/Mac] NODE_OPTIONS=--no-node-snapshot webcrack input.js ``` +::: + or ```sh @@ -32,10 +41,19 @@ For any other issues, please refer to the [isolated-vm readme](https://github.co Fix by running node with the [--max-old-space-size](https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes) flag. For example: -```sh +::: code-group + +```sh [Windows] +set NODE_OPTIONS=--max-old-space-size=8192 +webcrack bundle.js +``` + +```sh [Linux/Mac] NODE_OPTIONS="--max-old-space-size=8192" webcrack bundle.js ``` +::: + or ```sh