Netlify.toml and what exactly (functions = "functions") does

There are 2 ways to define functions in Netlify:

  1. Place your files in netlify/functions directory - no config needed.
  2. Place your files in any different folder and add:
[functions]
  directory = "folder"

OR

[build]
  functions = "folder"

in your netlify.toml.

Since your functions exist in functions folder and not in netlify/functions folder, you need to add:

[functions]
  directory = "functions"

OR

[build]
   functions = "functions"

to your netlify.toml.


About the actual problem:

You do not need netlify-lambda anymore and rather, should be removing it immediately. It’s an old, and almost unmainted package which could be soon deprecated in the future.

Instead, if you use netlify-cli, it would handle the functions for you automatically.

Also, note that, Netlify is a static file host - if you’re only trying to run Express using Netlify Functions without having any website with us, that’s not allowed.