Deployment fails immediately: file not found

Hello!

I have had my MERN stack deployed on Heroku for a while, and I am now trying to switch over to Render.

When I try to deploy either the front end(static) or back end(Web service), right after " ==> Cloning from https://github.com/…" begins, I get the same error: “cloner.sh: line 40: cd: /opt/render/project/src/master: No such file or directory”, and the deployment fails.

Googling has turned up nothing for me so far, and I have no idea how to locate this file or create it if I need it. Am I missing a file required for deployment here? Or doing something else wrong?

I would appreciate some advice if you have it. Thank you!

1 Like

Hi there,

Thanks for reaching out.

We usually see this error if the “Root Directory” option is set incorrectly. The majority of projects don’t need to have a value set for Root Directory unless you have a monorepo (multiple different apps in different folders in one repo). It can be edited on the Settings tab of the service.

Hope that helps

Alan

Thanks so much for the speedy reply! I fixed that issue just now and no longer getting that error.

My current problem is: “npm ERR! frontend@0.1.0 build: react-scripts build
npm installed again and still no luck
Hahah…I’ll get there eventually, I imagine. ; ) Googling away…

That error does usually point to dependencies not being installed, a common Build Command for Node apps would be npm install; npm run build; to ensure dependencies are installed/checked on each deploy.

Alan

1 Like

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