# Netlify dev - function not found

**URL:** <https://answers.netlify.com/t/netlify-dev-function-not-found/54748>\
**Category:** Support\
**Tags:** netlify-dev-open-beta, create-react-app\
**Created:** [April 10, 2022, 12:35pm UTC](https://answers.netlify.com/t/netlify-dev-function-not-found/54748 "2022-04-10T12:35:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicoleJaneway](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/nicolejaneway/32/36031_2.png) [@NicoleJaneway](https://answers.netlify.com/u/NicoleJaneway)\
**Post date:** [April 10, 2022, 12:35pm UTC](https://answers.netlify.com/t/netlify-dev-function-not-found/54748/1 "2022-04-10T12:35:51Z")

</div>

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

```auto
# 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?

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [April 10, 2022, 1:03pm UTC](https://answers.netlify.com/t/netlify-dev-function-not-found/54748/2 "2022-04-10T13:03:59Z")

</div>

Hi @NicoleJaneway,

We can’t comment on why that’s happening without seeing your repo or your folder structure. The only reason why this would happen is when you don’t have a file named `secret.js` in the `functions` folder (as per your `netlify.toml`).

---

<div class="post-metadata">

**Author:** ![NicoleJaneway](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/nicolejaneway/32/36031_2.png) [@NicoleJaneway](https://answers.netlify.com/u/NicoleJaneway)\
**Post date:** [April 10, 2022, 2:21pm UTC](https://answers.netlify.com/t/netlify-dev-function-not-found/54748/3 "2022-04-10T14:21:14Z")

</div>

Okay, yeah, that’s the fix.

The functions are in netlify/functions/, which is recognized on prod.

I put a copy of the functions into a separate functions/ folder. Now they are recognized in dev.
