diff --git a/install/libvips.js b/install/libvips.js index 673267b3..da2e4ab2 100644 --- a/install/libvips.js +++ b/install/libvips.js @@ -34,7 +34,12 @@ const extractTarball = function (tarPath) { cwd: vendorPath, strict: true }) - .catch(fail); + .catch(function (err) { + if (/unexpected end of file/.test(err.message)) { + npmLog.error('sharp', `Please delete ${tarPath} as it is not a valid tarball`); + } + fail(err); + }); }; try {