mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 02:30:12 +02:00
Revert "Package managers cannot handle nested optionalDependencies"
This partially reverts commit 51e56f994ce1332f77daf625e23820a895de074d. 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:
parent
ab00e34d0d
commit
80e4707af1
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
|
||||
|
@ -13,6 +13,9 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@sharpen/sharp-libvips-darwin-arm64": "0.0.1-alpha.1"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
|
@ -13,6 +13,9 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@sharpen/sharp-libvips-darwin-x64": "0.0.1-alpha.1"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
|
@ -13,6 +13,9 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@sharpen/sharp-libvips-linux-arm": "0.0.1-alpha.1"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
|
@ -13,6 +13,9 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@sharpen/sharp-libvips-linux-arm64": "0.0.1-alpha.1"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
|
@ -13,6 +13,9 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@sharpen/sharp-libvips-linux-x64": "0.0.1-alpha.1"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
|
@ -13,6 +13,9 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@sharpen/sharp-libvips-linuxmusl-arm64": "0.0.1-alpha.1"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
|
@ -13,6 +13,9 @@
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@sharpen/sharp-libvips-linuxmusl-x64": "0.0.1-alpha.1"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user