Failure to find module, index.js, babel, or react-scripts for example

Hey folks,

This is my first time using I’m trying to deploy two web services: a server and a fullstack app. I’ve been facing issues such as babel or react-scripts could not be found and something like this Error: Cannot find module '/opt/render/project/src/dist/index.js'.

I’ve tried messing Render’s start and build commands. I’ved tried the default yarn for build to npm install && npm run build.

I had just the same problem yesterday. The issue was different directory structure then I expected, so just remove build (dist) locally, build it and check what’s there.

In my case main file landed in dist/src/main.js, instead of dist/main.js, and that was the issue.

Hey Kevin,

Changing the package manage shouldn’t make a difference and you should also be consistent with whichever package manager you use in your dev environment. When packages are missing it does sound like they’re not being installed.

Please could you share some specific details of the issue you are experiencing that may help us troubleshoot it with you, e.g. any logs/errors/output, specific URLs, service name/ID, reproduction steps, etc. If you don’t want to share these details on the community forum, please feel free to raise a ticket from the “Contact Support” link at the bottom of the Dashboard.


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