Skip to content

Commit

Permalink
docs: add windows cmd script for NODE_OPTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
j4k0xb committed Sep 22, 2024
1 parent c11a872 commit 0ff80b6
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions apps/docs/src/guide/common-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0ff80b6

Please sign in to comment.