Skip to content

Commit 302bd93

Browse files
committed
docs: add pnpm 10 --allow-build flag for isolated-vm
1 parent 149b2f8 commit 302bd93

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

apps/docs/src/guide/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ yarn add webcrack
1313
```
1414

1515
```bash [pnpm]
16-
pnpm add webcrack
16+
pnpm add webcrack --allow-build=isolated-vm
1717
```
1818

1919
## Basic Usage

apps/docs/src/guide/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ yarn global add webcrack
1313
```
1414

1515
```bash [pnpm]
16-
pnpm add -g webcrack
16+
pnpm add -g webcrack --allow-build=isolated-vm
1717
```
1818

1919
:::

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ node --no-node-snapshot your-script.js
3535

3636
For any other issues, please refer to the [isolated-vm readme](https://github.com/laverdet/isolated-vm#requirements).
3737

38+
## Cannot Find Module
39+
40+
> Error: Cannot find module './out/isolated_vm'
41+
42+
This error may happen when using pnpm 10 or later, because it does not run the `postinstall` script by default to build or download the native modules of isolated-vm.
43+
44+
To fix this, re-run the install command with `--allow-build=isolated-vm --force` added or see the [pnpm 10 changelog](https://github.com/pnpm/pnpm/releases/tag/v10.0.0).
45+
3846
## Heap Out Of Memory
3947

4048
> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
@@ -44,8 +52,7 @@ Fix by running node with the [--max-old-space-size](https://nodejs.org/api/cli.h
4452
::: code-group
4553

4654
```sh [Windows]
47-
set NODE_OPTIONS=--max-old-space-size=8192
48-
webcrack bundle.js
55+
set NODE_OPTIONS=--max-old-space-size=8192 && webcrack bundle.js
4956
```
5057

5158
```sh [Linux/Mac]

0 commit comments

Comments
 (0)