According to On-demand Builders | Netlify Docs on demand builders should be in .netlify/builders
directory but it’s not working. I had to change my functions directory to .netlify/functions
directory or move builder to .netlify/functions
directory. Am I wrong? Please describe it.
Hi @ksenginew
Netlify automatically looks in netlify/functions
and builds and deploys any functions within that directory. Builders reside in the same directory as functions and after building functions are available via /.netlify/functions/<function-name>
and builders via /.nelify/builders/<builder-name>
as per the documentation you linked to.
For clarification, I have created a simple demonstration coelmay/builders-test which is deployed at unruffled-jepsen-e51ace.netlify.app.
Edit:
I have added a dev
branch with extra content pages published at dev–unruffled-jepsen-e51ace.netlify.app
Thanks, That’s the best way to explain it.
Holy cow. I spent hours trying to figure out what I was doing wrong.
I had a builder function in /.netlify/functions/
and was hitting that same route and it worked, but not as a builder function.
Then I moved the file to /.netlify/builders/
and was hitting that same route and getting “Function not found” and I was so confused.
Hunting and hunting and trying to figure out what was wrong.
Then I found your description, which turned on the lightbulb in my head:
The builder function should be in /.netlify/functions/{name}
but it’s invocation path is /.netlify/builders/{name}
.
TY!