cobiwave/gatsby-simplefolio

node-gyp-build/rebuild

sagarshreesha opened this issue · 1 comments

Build fails while installing dependencies. node-gyp and its dependent dependencies are causing the problem. Some sass package is the culprit I'm guessing based on basic research online.

This error is caused by your current version of node which you'll see if you run node -v is too new for the node sass dependency.

How I fixed it:

Go to https://github.com/sass/node-sass/releases/[](https://user-images.githubusercontent.com/65677845/156796847-36091a4d-06eb-49e1-a709-7312e416c069.png) to see which version of node the node-sass module requires which is 13.14.0 (maybe 14 as well).
image

In the terminal run nvm install 13.14.0

This should automatically switch you to that version but if it doesn't run nvm use 13.14.0 after it's installed. Then run node -v to check it's the right version.

Do a quick npm install or yarn install and you should be good to run gatsby develop.

Lastly for windows users you'll have to install 'nvm for windows', instructions can be found here: https://stackoverflow.com/questions/25654234/why-isnt-node-version-manager-nvm-recognized-on-windows , and make note that you might have to run your terminal (I use git bash) as the administrator for it to allow nvm to switch node versions.

Enjoy. Lastly if your issues do persist maybe think about pulling the new version of this repo on the develop branch and transfer your content over manually rather than waist hours trying to get this environment up to date.