Skip to content

Commit

Permalink
docs: explain how to use custom binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Sep 30, 2024
1 parent db7f2c5 commit 18ed3cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,14 @@ await exec(['app.js', '--target', 'host', '--output', 'app.exe']);
// do something with app.exe, run, test, upload, deploy, etc
```

## Use custom Node.js binary

In case you want to use custom node binary, you can set `PKG_NODE_PATH` environment variable to the path of the node binary you want to use and `pkg` will use it instead of the default one.

```bash
PKG_NODE_PATH=/path/to/node pkg app.js
```

## Troubleshooting

### Error: Cannot find module XXX (when using `child_process`)
Expand Down

0 comments on commit 18ed3cf

Please sign in to comment.