mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
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:
parent
db40ee6912
commit
1fa59bf9b3
@ -46,6 +46,7 @@ if (sharp) {
|
|||||||
// Common error messages
|
// Common error messages
|
||||||
if (prebuiltPlatforms.includes(runtimePlatform)) {
|
if (prebuiltPlatforms.includes(runtimePlatform)) {
|
||||||
const [os, cpu] = runtimePlatform.split('-');
|
const [os, cpu] = runtimePlatform.split('-');
|
||||||
|
const libc = os.endsWith('musl') ? ' --libc=musl' : '';
|
||||||
help.push(
|
help.push(
|
||||||
'- Ensure optional dependencies can be installed:',
|
'- Ensure optional dependencies can be installed:',
|
||||||
' npm install --include=optional sharp',
|
' npm install --include=optional sharp',
|
||||||
@ -53,15 +54,14 @@ if (sharp) {
|
|||||||
'- Ensure your package manager supports multi-platform installation:',
|
'- Ensure your package manager supports multi-platform installation:',
|
||||||
' See https://sharp.pixelplumbing.com/install#cross-platform',
|
' See https://sharp.pixelplumbing.com/install#cross-platform',
|
||||||
'- Add platform-specific dependencies:',
|
'- Add platform-specific dependencies:',
|
||||||
` npm install --os=${os} --cpu=${cpu} sharp`,
|
` npm install --os=${os.replace('musl', '')}${libc} --cpu=${cpu} sharp`
|
||||||
` npm install --force @img/sharp-${runtimePlatform}`
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
help.push(
|
help.push(
|
||||||
`- Manually install libvips >= ${minimumLibvipsVersion}`,
|
`- Manually install libvips >= ${minimumLibvipsVersion}`,
|
||||||
'- Add experimental WebAssembly-based dependencies:',
|
'- Add experimental WebAssembly-based dependencies:',
|
||||||
' npm install --cpu=wasm32 sharp',
|
' 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)) {
|
if (isLinux && /(symbol not found|CXXABI_)/i.test(messages)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user