I was having the same issue during the weekend.
My problem was that in my package.json file I wasn’t calling any functions to actually have the functions folder built during the build process.
What solved it was this line on package.json
"build:lambda": "netlify-lambda build backend",
backend is the folder that I have all my files that are setup for netlify lambda functions, so my tree structure looks like this.
root
| backend
| | servers.js
| src
| public
| package.json
…
I also used the following package to group different scripts
"npm-run-all": "^4.1.5",
so this is what my scripts object looked in package.json. Note that I am also starting a local server with pm2. Something I noticed was a thing on this netlify repo GitHub - neverendingqs/netlify-express: Express.js hosted on Netlify
"scripts": {
"start": "run-p start:**",
"build": "run-p build:**",
"start:app": "react-scripts start && pm2 start server-local.js",
"build:app": "react-scripts build",
"build:lambda": "netlify-lambda build backend",
"test": "react-scripts test",
"eject": "react-scripts eject"
}
Also, after everything is deployed, you’ll need to try the following url to check if your function is running
https://sitename.netlify.com/.netlify/functions/filename
or, if you’re routing multiple endpoints in the same file with something like express
https://sitename.netlify.com/.netlify/functions/filename/endpoint
I’m pretty new to this but hopefully some of this helps you