sharp: Unable to compile Sharp
What are you trying to achieve? Sharp is a dependency in a gatsby project I’m working on. Whenever I run any gatsby commands, I get the following error:
The module '<sharp module path>'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
- Ensure the version of Node.js used at install time matches that used at runtime
- Consult the installation documentation at https://sharp.pixelplumbing.com/en/stable/install/
- Search for this error at https://github.com/lovell/sharp/issues
I’ve run both npm rebuild and npm install and neither fix the issue.
Have you searched for similar questions? I noticed that issue 1689 was similar, however, I’m not using electron.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 10
- Comments: 19 (7 by maintainers)
@LACoderDeBH For expo-cli, please see https://github.com/expo/expo-cli/issues/591#issuecomment-491236180
i installed nvm, used that to install the specific node version, then removed node_modules and package-lock.json and ran npm install
On Mon, 17 Jun 2019 at 16:53, Susana LaCoder Benavidez < notifications@github.com> wrote:
I get this exact same issue too. I’ve tried completely removing, unlinking and pruning node and npm and re-installing, deleting node_modules folder. npm installing and npm uninstalling sharp, npm rebuilding. really not sure what’s going on but it means i can’t compile and run my gatsby site 😦
node -v v12.4.0 npm -v 6.9.0
Something went wrong installing the “sharp” module
The module ‘/node_modules/sharp/build/Release/sharp.node’ was compiled against a different Node.js version using NODE_MODULE_VERSION 67. This version of Node.js requires NODE_MODULE_VERSION 72. Please try re-compiling or re-installing the module (for instance, using
npm rebuildornpm install).