Skip to content

Commit 0ff80b6

Browse files
committed
docs: add windows cmd script for NODE_OPTIONS
1 parent c11a872 commit 0ff80b6

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

apps/docs/src/guide/common-errors.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,19 @@ To fix this, run `npm rebuild isolated-vm` in your project directory or delete t
1414

1515
For Node 20.x and above, disabling snapshots may be necessary:
1616

17-
```sh
17+
::: code-group
18+
19+
```sh [Windows]
20+
set NODE_OPTIONS=--no-node-snapshot
21+
webcrack input.js
22+
```
23+
24+
```sh [Linux/Mac]
1825
NODE_OPTIONS=--no-node-snapshot webcrack input.js
1926
```
2027

28+
:::
29+
2130
or
2231

2332
```sh
@@ -32,10 +41,19 @@ For any other issues, please refer to the [isolated-vm readme](https://github.co
3241
3342
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:
3443

35-
```sh
44+
::: code-group
45+
46+
```sh [Windows]
47+
set NODE_OPTIONS=--max-old-space-size=8192
48+
webcrack bundle.js
49+
```
50+
51+
```sh [Linux/Mac]
3652
NODE_OPTIONS="--max-old-space-size=8192" webcrack bundle.js
3753
```
3854

55+
:::
56+
3957
or
4058

4159
```sh

0 commit comments

Comments
 (0)