Skip to content

Commit

Permalink
Add additional debugging hint on symbol error (#3132)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinroger authored Mar 14, 2022
1 parent ac883c5 commit 27d9fe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sharp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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[\\/]([^\\/]+)[\\/]/);
Expand Down

0 comments on commit 27d9fe2

Please sign in to comment.