Yarn pnp unsupported, use alternative nodeLinker

This commit is contained in:
Lovell Fuller 2023-10-10 11:14:39 +01:00
parent 4b028edfe9
commit 9b5eecba8f
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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');