I need to be able to locally test my lambda functions. When I run Netlify dev, I see that the Functions server is listening on 55616
then when I POST, I see this:
Request from ::1: POST /.netlify/functions/secret
Response with status 404 in 3 ms.
In the Network tab of the console: “Function not found…”
Here’s my netlify.toml
# The following redirect is intended for use with most SPAs that handle
# routing internally.
[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"
[build]
command = "npm run build"
functions = "functions/" # netlify dev uses this directory to scaffold and serve your functions
publish = "dist"
[dev]
command = "npm run start"
port = 8888
targetPort = 3000
publish = "dist"
autoLaunch = true
framework = "create-react-app"
I don’t get why Netlify dev can’t find my functions. They worked in production at hungry-noyce-fb652c. What am I missing in Netlify dev?