Improve error messaging when platform mismatch detected

This commit is contained in:
Lovell Fuller 2020-05-19 18:53:39 +01:00
parent 6f49be8f26
commit fc2f672337

View File

@ -65,7 +65,7 @@ const hasVendoredLibvips = function () {
if (currentPlatformId === vendorPlatformId) { if (currentPlatformId === vendorPlatformId) {
return true; return true;
} else { } else {
throw new Error(`'${vendorPlatformId}' binaries cannot be used on the '${currentPlatformId}' platform. Please remove the 'node_modules/sharp/vendor' directory and run 'npm install'.`); throw new Error(`'${vendorPlatformId}' binaries cannot be used on the '${currentPlatformId}' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the '${currentPlatformId}' platform.`);
} }
} else { } else {
return false; return false;