diff --git a/lib/sharp.js b/lib/sharp.js index 4a4dd22c..9c865780 100644 --- a/lib/sharp.js +++ b/lib/sharp.js @@ -21,7 +21,7 @@ try { '- Consult the installation documentation: https://sharp.pixelplumbing.com/install' ); // Check loaded - if (process.platform === 'win32') { + if (process.platform === 'win32' || /symbol/.test(err.message)) { const loadedModule = Object.keys(require.cache).find((i) => /[\\/]build[\\/]Release[\\/]sharp(.*)\.node$/.test(i)); if (loadedModule) { const [, loadedPackage] = loadedModule.match(/node_modules[\\/]([^\\/]+)[\\/]/);