Skip to content

Commit

Permalink
docs: add pnpm 10 --allow-build flag for isolated-vm
Browse files Browse the repository at this point in the history
  • Loading branch information
j4k0xb committed Feb 14, 2025
1 parent 149b2f8 commit 302bd93
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/docs/src/guide/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ yarn add webcrack
```

```bash [pnpm]
pnpm add webcrack
pnpm add webcrack --allow-build=isolated-vm
```

## Basic Usage
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ yarn global add webcrack
```

```bash [pnpm]
pnpm add -g webcrack
pnpm add -g webcrack --allow-build=isolated-vm
```

:::
Expand Down
11 changes: 9 additions & 2 deletions apps/docs/src/guide/common-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ node --no-node-snapshot your-script.js

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

## Cannot Find Module

> Error: Cannot find module './out/isolated_vm'
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.

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).

## Heap Out Of Memory

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

```sh [Windows]
set NODE_OPTIONS=--max-old-space-size=8192
webcrack bundle.js
set NODE_OPTIONS=--max-old-space-size=8192 && webcrack bundle.js
```

```sh [Linux/Mac]
Expand Down

0 comments on commit 302bd93

Please sign in to comment.