From 18ed3cfd1e79108de534d0c10e7172c9d9a89765 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Mon, 30 Sep 2024 17:33:12 +0200 Subject: [PATCH] docs: explain how to use custom binaries --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 88b9c19b..28e811d2 100644 --- a/README.md +++ b/README.md @@ -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`)