diff --git a/docs/install.md b/docs/install.md index 68200997..9f676773 100644 --- a/docs/install.md +++ b/docs/install.md @@ -5,13 +5,15 @@ npm install sharp ``` ```sh -yarn add sharp +pnpm add sharp ``` ```sh -pnpm add sharp +yarn add sharp ``` +Yarn Plug'n'Play is unsupported. + ## Prerequisites * Node.js >= 18.17.0 diff --git a/lib/sharp.js b/lib/sharp.js index 231a7829..6f28fcad 100644 --- a/lib/sharp.js +++ b/lib/sharp.js @@ -53,6 +53,10 @@ try { if (errPackage.code === 'ERR_DLOPEN_DISABLED') { help.push('- Run Node.js without using the --no-addons flag'); } + if (process.versions.pnp) { + help.push('- Use a supported yarn linker, either pnpm or node-modules'); + help.push(' yarn config set nodeLinker node-modules'); + } // Link to installation docs if (isLinux && /Module did not self-register/.test(errLocal.message + errPackage.message)) { help.push('- Using worker threads on Linux? See https://sharp.pixelplumbing.com/install#worker-threads');