skip to Main Content

enter image description here

I’m getting this error when I try to deploy my React app on render.com. I have installed react-scripts in it also and I also tried by deleting node_modules/ folder.

3

Answers


  1. First check if "react-scripts" exists on your dependencies in your package.json

    than On render.com make sure you selected static site because you can only deploy React via a Static Site

    you can check the docs it’s mentioned there

    Login or Signup to reply.
  2. check whether react-scripts is there or not. if not then install it.
    if it still doesn’t works, delete your node_modules and install all packages again.

    Login or Signup to reply.
  3. It looks like you may be missing a command in your build step.

    If you used the Render Create React App doc, note that Render just updated the doc to fix the build command.

    The build command should be yarn; yarn build (instead of just yarn).

    Thanks to @metonym for the fix.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search