Netlify frustration. There is netlify.yaml and don’t change the dns too fast

0

Ok, I spent way too much time like hours on this bug. But I’ve gotten to the point where I can fork a repo and create a new website just by adding to new files with Unsplash.

But I hit a really confusing problem that drove me crazy. The problem is that netlify.toml. We are living in the world of maximum initialization file confusion. Most utilities like Hugo accept both TOML and YAML files. And netlify does too at least according to A post from last year.

Well it turns out this isn’t true. If you convert to yaml, then netlify doesn’t find any build instructions at all. I have a bunch of Go modules and they use a union file system to place things. So you are warned.

The errors are very strange. It just assumes some defaults because it has some defaults if it can detect it’s a Hugo or whatever file. If they are blank then the build does nothing and succeeds. Or if it detects Hugo since I’m using modules it reports a ton of missing files. The confusing thing is that this netlify.toml isn’t used with local builds so all the local stuff works fine.


One side effect of this is I tried to delete the netlify configuration and start again. This was a super bad idea because the DNS get very confused. For about an hour too I could build locally with both “netlify dev” and “Hugo server” but I could not deploy either with a push or a manual “netlify deploy”

Also when you rebuild the system, you have to remember to add a shell command with netlify env got GIT_LFS_ENABLED. And you have to Reling the repo. Basically linking means the guid for netlify gets written into a JSON file in .netlify so that it knows where to deploy.

The long and short of it is that deleting is a bad idea and wrapping all this into a makefile is a very good one.

Related Posts