mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Improve experience for those using Apple M1 devices #2460
- For Rosetta x64, prevent use of global ARM64 libvips - For ARM64, improve error message when global libvips not found
This commit is contained in:
@@ -74,6 +74,9 @@ try {
|
||||
if (arch === 'ia32' && !platformAndArch.startsWith('win32')) {
|
||||
throw new Error(`Intel Architecture 32-bit systems require manual installation of libvips >= ${minimumLibvipsVersion}`);
|
||||
}
|
||||
if (platformAndArch === 'darwin-arm64') {
|
||||
throw new Error("Please run 'brew install vips' to install libvips on Apple M1 (ARM64) systems");
|
||||
}
|
||||
if (platformAndArch === 'freebsd-x64' || platformAndArch === 'openbsd-x64' || platformAndArch === 'sunos-x64') {
|
||||
throw new Error(`BSD/SunOS systems require manual installation of libvips >= ${minimumLibvipsVersion}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user