I've gatsby project which works fine and also have 404 page, but either I get the error during gatsby build or open the browser after successfully completed the build process:
Building static HTML for pageserror: Error: ENOENT: no such file or directory
if the error I didn't get during the gatsby build time then I have to get on the browser when run gatsby serve and open browser:
Error: ENOENT: no such file or directory, stat '/project/public/404.html'