I’m a first-time Netlify user attempting to deploy from a Git repo but this is failing on each attempt.
Initally I have the DNS of a domain resolving to Netlify Name Servers, but both the domain name proper and the trusting-neumann domain lead to generic Page Not Found error. Maybe that’s a pointer to the deploy errors but I can’t find the answer.
I have netlify CLI installed on my mac (running Mojave) and the error messages point to a missing file/dir.
Thanks for the reply. I don’t have a netlify.toml file in the project - did a global search and also looked at hidden files.
Should I create that file myself and populate it with what you advised, or does its absence point to something else that needs doing (e.g. something via the cli)?
Ok thanks - I can’t see or gain access to netlify.toml anywhere in the Settings panel, have checked all options (I believe). Where is that?
My account is a Starter plan, if that makes any difference.
So as an alt I created a netlify.toml file locally, added what you advised, committed and and did a new deploy (cache-cleared) and now that fails based on this (understandable) feedback:
… … > 8:59:31 AM: Found netlify.toml. Overriding site configuration > 8:59:31 AM: Different publish path detected, going to use the one specified in the toml file: ‘dist’ versus ‘master/dist’ in the site
8:59:31 AM: Starting build script
8:59:31 AM: failed during stage ‘building site’: fork/exec /usr/local/bin/build: no such file or directory
8:59:31 AM: Build command unable to start
8:59:31 AM: Error running command: fork/exec /usr/local/bin/build: no such file or directory
8:59:31 AM: Failing build: Failed to build site
During setup I opted for Master as my deploy branch, which is referenced in this error message, but it seems my .toml file messed with that.
So I edited the .toml file to publish = "master/dist" and re-deployed (cache cleared). This failed with the following error:
… …
9:22:11 AM: Preparing Git Reference refs/heads/master
9:22:11 AM: Found netlify.toml. Overriding site configuration
9:22:11 AM: Starting build script
9:22:11 AM: Build command unable to start
9:22:11 AM: failed during stage ‘building site’: fork/exec /usr/local/bin/build: no such file or directory
9:22:11 AM: Error running command: fork/exec /usr/local/bin/build: no such file or directory
9:22:11 AM: Failing build: Failed to build site
So I removed the .toml file from the repo and am back to sq-1, failed deploys. If I can find the .toml file in the site Settings I guess that’ll fix it.
I recommend you add the netlify.toml to the root of your repository, add the dist folder as an ignore and remove it from the repo., then create a new site from the repository. Here is the repository I used: https://github.com/talves/redhed-original
Right ok many thanks for doing that! Weird as it appears to be the same as what I did - added .toml to root - but so it goes. I can’t do this til Sunday morn uk time but will write back here asa when I have.
Got it running and deployed now, many thanks for your input.
I did what you advised, created a new site from the repo and deployed it. But also it seems I hadn’t locally linked the site via the CLI - not entirely sure if that was the prob but whatever, I also did that locally, deployed and it works and reflecting any local updates.
Maybe I was getting ahead of myself in the docs and not adding that local link, not sure tbh, but it’s working now.
Thanks!