Build file not found NPM & NodeJS

I’m using the free tier of Render.com and trying to deploy a project but keep getting this message: “ENOENT: no such file or directory, stat ‘/opt/render/project/src/client/build/index.html’”.

I am using “NPM Install” as build command. Any pointers would be appreciated!

Hi,

It looks like the error is looking for a build folder. Do you need to do a build? e.g. npm install && npm run build.

Alan

Hi! Thanks for your help!

I was following a tutorial I found online and was deploying front + back end in a single service. I’ve gone ahead and split my front and back end, as I’ve read this is the best practice.

Again, thank you for your support!

It looks like you’re trying to run a React app, maybe try following our React guide to deploy to a Static Site: https://render.com/docs/deploy-create-react-app

Alan

1 Like