Netlify function not found though the site was working fine

Hi here is my site aws-apis-managmenet.netlify.app it was deployed successfully and the function was working fine with the express. I just upgraded the netlify cli and started working on the update of the same site locally but I got the message “Function not found” though the site before was working fine and when I head over to the production site same was the case there I couldn’t figure out problem I have tried many ways but no luck. here is screenshot of the code structure
image

Hi @devbuddy,

Thanks for reaching out and welcome to Netlify’s Support Forums!

Could you ensure that the file isn’t being ignored with the .gitignore, I know sometimes that can happen when deploying from GitHub but not sure if that would happen when deploying from Netlify CLI.

Also ensure that the netlify.toml is correctly configured to point to the functions directory.

Additionally, can you ensure you’re using the latest version of Netlify CLI?

@Melvin
here is the screenshot of the netlify cli
I am using the netlify-cli/17.23.5 win32-x64 node-v21.2.0
here is the netlify.toml screenshot


here is my .gitigore file screenshot
only .netlify folder is in the .gitignore
Please let me know what is missing or needed to be refactored

Hi @devbuddy,

Since you’re doing manual deploys it’s hard to see what the issue could be. However, from the netlify.toml screenshot you provided, it doesn’t appear to be the same as the netlify.toml in the deploy:

redirectsOrigin = "config"
plugins = []
headers = []

[functions]

  [functions."*"]
  node_bundler = "esbuild"
  external_node_modules = [
    "express"
  ]

[build]

  [build.environment]

  [build.processing]

    [build.processing.css]

    [build.processing.html]

    [build.processing.images]

    [build.processing.js]

  [build.services]

[[redirects]]
from = "/api/*"
to = "/.netlify/functions/api/:splat"
status = 200
force = true

  [redirects.query]

  [redirects.conditions]

  [redirects.headers]

You can see the Deploy file browser at the bottom here.

@Melvin I didnt uploaded the new code yet but the live version also got effected no function is working now seeing the message function not found

Can you confirm you’ve followed: Express on Netlify | Netlify Docs?

To deploy from CLI, you’d need the command: netlify deploy --build.

@hrishikesh Yes I did and the things were good and working I was using them as well but I don’t know why it all went wrong couldn’t get this.

Feel free to share your repo then.