From a619f293134763079754545b4bf5b8e265a9e1ee Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sun, 2 Mar 2025 15:47:26 +0000 Subject: [PATCH] Docs: add note about pnpm install script permission --- docs/src/content/docs/install.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/content/docs/install.md b/docs/src/content/docs/install.md index 553c86b2..37dbdf35 100644 --- a/docs/src/content/docs/install.md +++ b/docs/src/content/docs/install.md @@ -128,6 +128,10 @@ If `node-addon-api` or `node-gyp` cannot be found, try adding them via: npm install --save node-addon-api node-gyp ``` +When using `pnpm`, you may need to add `sharp` to +[onlyBuiltDependencies](https://pnpm.io/package_json#pnpmonlybuiltdependencies) +to ensure the installation script can be run. + For cross-compiling, the `--platform`, `--arch` and `--libc` npm flags (or the `npm_config_platform`, `npm_config_arch` and `npm_config_libc` environment variables) can be used to configure the target environment.