i have a usegravity boilerplate app, the uploaded is successful but the site is empty… can someone help me how to fix this… thanks
Hi there,
It looks like you’re trying to setup a monorepo project. I’d take a guess that the react-scripts: not found
is happening because you’ve not run npm install
in the client directory of your repo (going from the Build Command in your screenshot).
It also looks like you’re trying to run two processes in one Start Command, which is possible, but a Web Service can only expose one HTTP port to the public, so that may need to be a consideration.
However, react-scripts
isn’t a production-ready tool, you should probably be building the React code before serving it. npm run dev
doesn’t sound production-ready, either. Dev tools often require more CPU/RAM to do on-the-fly compilation, etc. When deploying to Render it’s usually expected that you’ll be running your app in a production mode.
There are a couple of common patterns for these kinds of monorepo setups:
-
Separate Services
Client/frontend as a Static Site, e.g.: https://render.com/docs/deploy-create-react-app
Backend as a Web Service, e.g. https://render.com/docs/deploy-node-express-app
This would require the frontend to make client-side calls to the backend URL, which would also probably need some CORS config on the backend. -
Single Service
Backend as a single Web Service, that also serves the built static files through something like thestatic
middleware in Express.
Hope that helps
Alan
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.