diff --git a/lib/sharp.js b/lib/sharp.js index 7a7078d9a..e90109137 100644 --- a/lib/sharp.js +++ b/lib/sharp.js @@ -12,6 +12,9 @@ try { help.push('- Update Homebrew: "brew update && brew upgrade vips"'); } else { const [platform, arch] = platformAndArch.split('-'); + if (platform === 'linux' && /Module did not self-register/.test(err.message)) { + help.push('- Using worker threads? See https://sharp.pixelplumbing.com/install#worker-threads'); + } help.push( '- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"', `- Install for the current ${platformAndArch} runtime: "npm install --platform=${platform} --arch=${arch} sharp"`