gatsby-simplefolio icon indicating copy to clipboard operation
gatsby-simplefolio copied to clipboard

Unable to deploy using netlify

Open nikhilno1 opened this issue 3 years ago • 2 comments

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=

nikhilno1 avatar Oct 02 '21 11:10 nikhilno1

I unfortunately have this same error. Maybe the the version of gatsby for this is too outdated.

scrutch93 avatar Oct 25 '21 03:10 scrutch93

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)

Giuseppetm avatar Dec 01 '21 09:12 Giuseppetm

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.

robinpunn avatar Oct 10 '22 05:10 robinpunn