skip to Main Content

I tried setting up a ReactJS app with create-react-app on my DigitalOcean Droplet with 10 GB disk space and 512 MB RAM (Ubuntu 22.04), though it keeps failing on react-scripts. When I do it on my much better equipped local machine (also Ubuntu), it works fine. Any idea what might cause this?

2

Answers


  1. It might be due to the available RAM. Following what was tried in this answer:

    node --max_old_space_size=512 node_modules/.bin/react-scripts build
    
    Login or Signup to reply.
  2. export NODE_OPTIONS=–max_old_space_size=512

    npx create-react-app my-app

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