Error: ENOENT: no such file or directory, stat '/var/task/src/functions/public/home.html'

I’m trying to deploy my express based site on netlify and my local directory look like this:

directory image

and my netlify.toml looks like this:

    [build]
      functions="functions"

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

It works fine when I run it locally using netlify dev
but when I deploy the site on netlify it shows this error:

enter image description here

I’ve even tried this and this approach but it isn’t seem to work in my case
I’m a beginner so I’m not quite sure what mistake I’m making, so any help is greatly appreciated!

hi there, are you trying to deploy a server to netlify? that won’t work the way you are maybe expecting it to.

Here is a good summary of what you can and can not do on Netlify you might find helpful: