Functions not deploying

My functions are not being deployed.

I created a folder called lambda on my private repository’s root, added my identity function inside, and changed the netlify.toml to reflect the change.

My identity function worked fine the first time. I was a happy man.

Now, I added another function, “image.js” from one of the examples from the documentation and deployed. Nada. I don’t see anything. Not this new function, not my previous one that was working just fine moments ago. Zero functions being shown.

How can this be? I assumed I made no mistakes since it was previously working?

My site is

Any help will be greatly appreciated.

Okay, answering my own post. I realized that there was an error on the image.js example from the documentation. It said that fetch was not found or something, so my build wasn’t being deployed.

But I never realized this until I went to the builds! There should be something more intuitive when building from the web panel (I’m not using the Netlifly cli). When you get a failed build, there should be a notification of some kind, in case you are somewhere else in the panel, which is what happened to me (I was on Functions)

I simply deleted this example and everything worked fine again. Now I’m looking into experimenting more.

Hi @MrAllanQuatermain welcome to the Netlify community.

Unbundled functions are only deployed when connected to git or via the CLI, not when uploading a site via the Netlify web UI as per Build serverless functions with JavaScript | Netlify Docs.

Did you have something like const fetch = require("node-fetch"); at the top of your function file to tell the build system that fetch was required by the function?

Continue experimenting. I do it every day. It’s all a learning experience.

1 Like