mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Docs: make use of optional dependencies even clearer
This commit is contained in:
parent
c80e92fa16
commit
4d049ee8f5
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Works with your choice of JavaScript package manager.
|
Works with your choice of JavaScript package manager.
|
||||||
|
|
||||||
Please ensure optional dependencies can be installed.
|
> ⚠️ **Please ensure your package manager is configured to install optional dependencies**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install sharp
|
npm install sharp
|
||||||
|
@ -46,6 +46,8 @@ 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('-');
|
||||||
|
help.push('- Ensure optional dependencies can be installed:');
|
||||||
|
help.push(' npm install --include=optional');
|
||||||
help.push('- Add platform-specific dependencies:');
|
help.push('- Add platform-specific dependencies:');
|
||||||
help.push(` npm install --os=${os} --cpu=${cpu} sharp`);
|
help.push(` npm install --os=${os} --cpu=${cpu} sharp`);
|
||||||
help.push(' or');
|
help.push(' or');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user