mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Revert "Package managers cannot handle nested optionalDependencies"
This partially reverts commit 51e56f994c.
Ignoring plug'n'play, it looks like yarn and pnpm do get the
filesystem layout right for this scenario, which is good news.
It also looks like npm 10 will get it right too.
This commit is contained in:
13
lib/sharp.js
13
lib/sharp.js
@@ -30,11 +30,8 @@ try {
|
||||
help.push('Possible solutions:');
|
||||
// Common error messages
|
||||
if (prebuiltPlatforms.includes(runtimePlatform)) {
|
||||
help.push('- Add explicit dependencies for the runtime platform:');
|
||||
help.push(` npm install --force @sharpen/sharp-${runtimePlatform}`);
|
||||
if (!isWindows) {
|
||||
help.push(` npm install --force @sharpen/sharp-libvips-${runtimePlatform}`);
|
||||
}
|
||||
help.push('- Add an explicit dependency for the runtime platform:');
|
||||
help.push(` npm install --force @sharpen/sharp-${runtimePlatform}"`);
|
||||
} else {
|
||||
help.push(`- The ${runtimePlatform} platform requires manual installation of libvips >= ${minimumLibvipsVersion}`);
|
||||
}
|
||||
@@ -43,7 +40,9 @@ try {
|
||||
const { engines } = require(`@sharpen/sharp-libvips-${runtimePlatform}/package`);
|
||||
const libcFound = `${familySync()} ${versionSync()}`;
|
||||
const libcRequires = `${engines.musl ? 'musl' : 'glibc'} ${engines.musl || engines.glibc}`;
|
||||
help.push(`- Update your OS: found ${libcFound}, requires ${libcRequires}`);
|
||||
help.push('- Update your OS:');
|
||||
help.push(` Found ${libcFound}`);
|
||||
help.push(` Requires ${libcRequires}`);
|
||||
} catch (errEngines) {}
|
||||
}
|
||||
if (isMacOs && /Incompatible library version/.test(errLocal.message)) {
|
||||
@@ -54,7 +53,7 @@ try {
|
||||
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('- Use a supported yarn linker, either pnpm or node-modules:');
|
||||
help.push(' yarn config set nodeLinker node-modules');
|
||||
}
|
||||
// Link to installation docs
|
||||
|
||||
Reference in New Issue
Block a user