From 27d9fe2a4e3c55706395263e216cb30f4c7aa23e Mon Sep 17 00:00:00 2001 From: Marvin ROGER Date: Mon, 14 Mar 2022 11:19:02 +0100 Subject: [PATCH] Add additional debugging hint on symbol error (#3132) --- lib/sharp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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[\\/]([^\\/]+)[\\/]/);