Im getting an error Error: ENOENT: no such file or directory, stat '/opt/render/project/src/build/index.html'

I am new to Render and have encountered an issue while trying to deploy my repository to Render. I’m not quite sure what steps to take as I’ve only tested my web app locally.
Any help is appreciated.
Thanks in advance

when i run the build command locally the build folder is created outside the src folder

Hi there

It looks like you’re not building your application. If you go to your service check your build command, what is it?

The app is trying to serve build/index.html but it doesn’t exist, most likely because /build was never created because the build command was never called.

the project/src folder is a render folder, not your src folder for the code. If you have src folder in your root then on render its project/src/src and your build folder is project/src/build

Hey,

At this time, it looks like your service is failing at build time:

Jan 1 07:42:55 AM ==> Build folder src/build does not exist!Jan 1 07:42:55 AM ==> Build failed 😞

Make sure that build folder is actually located where your code expect it at build time. Additionally, it’s commonly not placed under the “src” folder in JS projects.

Jérémy, Render Support

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.