Hi all, please help me resolve this ongoing issue. I’m new to the Gridsome world and I’m trying to deploy a starter site. However, the “gridsome build” command is failing each time I try to deploy.
ok, your package.json config and your build commands match, but, i am not seeing your package.json in your repo? You’ll need to include that so that we know what to install and how to build.
Unless - are you deploying built html?
in that case just remove the build command from the build settings.
I think I might be transferring the build incorrectly to my repo. I’m not seeing the “normal” files after watching a couple of tutorials. I thought I just ran the “gridsome build” command and that creates a “dist” folder. I push that to my repo and walahhh. I guess I’m missing something here.
include your src files (the stuff we build html from)
include a package json (at the site root in most cases)
include a correct build command in the Netlify UI (in your case gridsome build)
push the whole lot to github
and then we run the build process for you, generate the html, and push the html out to the CDN edge nodes
OR
you run your build (gridsome build) on local,
add the html files only to the repo,
dont include a package.json
push the repo
leave the build command blank
and the system detects you already have html files and pushes that our to our CDN nodes.
So the gridsome build process still has to happen, just the question is when/where, and the steps are different depending on how you want to set things up. It’s the difference between opening your umbrella inside and then needing it to carry it through the doorway, or waiting until you are outside and then opening it. A different process for both.
That helps a ton. I’ll try it again from scratch, both ways. Option B sounds much nicer because that is pretty much what is happening every time I run a new “gridsome build” command. Much appreciated. I’ll ping again if there is no resolve. Thanks.
I went with the option to leave the build blank, it worked! I guess when I run the “gridsome build” command there are things happening behind the scenes. I might try to create a new repo and site to see if I can build/deploy with the src files, package.json, etc. Thanks again!
hooray! glad its working. Yeah, getting netlify do to the build + deploy step is exactly what makes our platform so powerful, so i recommend trying to investigate that and getting it to work on a separate site. the main point is to get your build settings (directories, and build command) to match up with your package.json and it should be smooth sailing. hit us up again if you get stuck