Skip to content

Commit

Permalink
Remove any suggestion to --force install
Browse files Browse the repository at this point in the history
This is probably a bad idea in the long run as versions can
get out of sync and other genuine warnings might be ignored.
  • Loading branch information
lovell committed Dec 28, 2023
1 parent db40ee6 commit 1fa59bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/sharp.js
Expand Up @@ -46,22 +46,22 @@ 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',
' yarn add sharp --ignore-engines',
'- 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)) {
Expand Down

0 comments on commit 1fa59bf

Please sign in to comment.