Netlify CLI, dev, function not found

I’m using netlify dev locally to build a serverless function. It was working great. Now it’s not working, I don’t know what I did, and I can’t get it back. I get 404s when trying to access my url, http://localhost:8888/.netlify/functions/pick.

It does work on production deploy. I’m just using defaults. I did create an includes folder, but not in my functions folder, on the same level.

Did you define your functions folder as netlify/functions? As of this week, the default folder for functions is functions (in your repo’s root folder), so if you want to go for zero configuration, I advise you to get rid of the netlify folder.

Thank you. I renamed the netlify/functions folder to functions. Still no luck though. netlify dev does not run lambda by itself. I have to use the -functions switch.

1 Like

Did you specify a functions directory in your netlify.toml file? I think the functions should be picked up, or so I assume from the docs: File-based configuration | Netlify Docs

Personally, I haven’t encountered this problem before so it might be a configuration issue perhaps?

Yes that worked, thank you. netlify.toml is not required for deploy, but required for netlify dev. Thank you once again. :slight_smile:

1 Like