skip to Main Content

I have an NPM script for building react application written like this "build": "react-scripts build". When I run npm run build the following (incomplete) directory structure is created:

build
|-- images
|-- manifest.json

After some time the command completes but the output is some minimized code followed by many lines of whitespace and a single red ^.

I tried increasing heap memory size with --max_old_space_size=8192 but the result is the same. How do I even debug this?

2

Answers


  1. Chosen as BEST ANSWER

    This was caused by LightningChart JS library, particularly "@arction/lcjs" package. Merely by including import statement such as import { emptyFill } from @arction/lcjs caused the build to fail. Updating to React 18 solved the problem.


  2. Please check node and npm version on server.
    Is it working fine on localhost?

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