6

gatsby develop success openly and validate gatsby-configs - 0.005 s error Something went wrong installing the "sharp" module The module '\?\D:\korero\node_modules\sharp\build\Release\sharp.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 79. 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 ⠋ load plugins

brooksrelyt
  • 3,925
  • 5
  • 31
  • 54
Santosh Das
  • 71
  • 1
  • 5

3 Answers3

7

Looks like you have upgraded your NodeJS version? The sharp package was initially installed and built under a different node version as the error states.

Compiled against NODE_MODULE_VERSION = 64 (NodeJS 10.x) while your current NodeJS expects NODE_MODULE_VERSION = 79 which means you're using Node 13.

An easy fix would be to simply run:

npm rebuild
Z. Zlatev
  • 4,757
  • 1
  • 33
  • 37
0

sudo rm -rf /usr/local/Cellar/python3.8 if it exists

sudo rm -rf /usr/local/Cellar/python3.9 if it exists

brew upgrade

remove any one if it exists:

rm -rf package-lock.json

rm -rf yarn.lock

rm -rf node_modules

Then yarn install

Worked for me

kohane15
  • 809
  • 12
  • 16
0

Try removing node_modules and package-lock.json and yarn.lock files and clearing cache (using yarn cache clean or npm cache clean --force.

lastly,

try updating your npm or node versions

npm install npm@latest -g

This worked for me

Abhishek
  • 29
  • 6