Skip to content

Commit 18ed3cf

Browse files
committed
docs: explain how to use custom binaries
1 parent db7f2c5 commit 18ed3cf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,14 @@ await exec(['app.js', '--target', 'host', '--output', 'app.exe']);
400400
// do something with app.exe, run, test, upload, deploy, etc
401401
```
402402

403+
## Use custom Node.js binary
404+
405+
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.
406+
407+
```bash
408+
PKG_NODE_PATH=/path/to/node pkg app.js
409+
```
410+
403411
## Troubleshooting
404412

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

0 commit comments

Comments
 (0)