Remove any suggestion to --force install

This is probably a bad idea in the long run as versions can
get out of sync and other genuine warnings might be ignored.
This commit is contained in:
Lovell Fuller 2023-12-28 11:24:41 +00:00
parent db40ee6912
commit 1fa59bf9b3

View File

@ -46,6 +46,7 @@ if (sharp) {
// Common error messages
if (prebuiltPlatforms.includes(runtimePlatform)) {
const [os, cpu] = runtimePlatform.split('-');
const libc = os.endsWith('musl') ? ' --libc=musl' : '';
help.push(
'- Ensure optional dependencies can be installed:',
' npm install --include=optional sharp',
@ -53,15 +54,14 @@ if (sharp) {
'- Ensure your package manager supports multi-platform installation:',
' See https://sharp.pixelplumbing.com/install#cross-platform',
'- Add platform-specific dependencies:',
` npm install --os=${os} --cpu=${cpu} sharp`,
` npm install --force @img/sharp-${runtimePlatform}`
` npm install --os=${os.replace('musl', '')}${libc} --cpu=${cpu} sharp`
);
} else {
help.push(
`- Manually install libvips >= ${minimumLibvipsVersion}`,
'- Add experimental WebAssembly-based dependencies:',
' npm install --cpu=wasm32 sharp',
' npm install --force @img/sharp-wasm32'
' npm install @img/sharp-wasm32'
);
}
if (isLinux && /(symbol not found|CXXABI_)/i.test(messages)) {