gatsby-simplefolio
gatsby-simplefolio copied to clipboard
Unable to deploy using netlify
Hello,
I keep reading about how easy it is to deploy using netlify. Unfortunately, whenever I have tried, it has never worked for me. :( It keeps failing due to some reason or another.
Attaching the failure build log. Could you please let me know what the issue here is? netlify-build-failure.txt ?
4:40:47 PM: npm ERR! code 1
4:40:47 PM: npm ERR! path /opt/build/repo/node_modules/node-sass
4:40:47 PM: npm ERR! command failed
4:40:47 PM: npm ERR! command sh -c node scripts/build.js
4:40:47 PM: npm ERR! Building: /opt/buildhome/.nvm/versions/node/v16.10.0/bin/node /opt/build/repo/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
I unfortunately have this same error. Maybe the the version of gatsby for this is too outdated.
You can resolve by doing this: install the netlify cli, adjust your repo on the netlify website (do not enable automatic deploy) and run these commands:
npm run develop
npm run build
netlify deploy
(to see a preview)
netlify deploy --prod
(deploy it to the URL specified on the netlify website)
I was having issues as well because I was trying to deploy the site by linking my github repo.
After searching around for a bit, I found this tutorial: Net Ninja
First of all, In order for me to install the dependencies while I was attempting this in 2022, I had to use node version 13.14.0.
After customizing the site, I ran npm run build
.
Running that command should update your public folder.
From there, all you have to do is drag your public folder into the new site creation 'Manual Upload' section which should be just below the 'Import' and 'Template' options.
That worked for me.