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
ornpm 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
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
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
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 😄
© 2022 - 2024 — McMap. All rights reserved.
rm -rf node_modules
and thennpm install
again? – Exuviatenode_modules
doesn't solve this problem. @Exuviate – Brockington