Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running `react-scripts build` fails, but there is no output about what went wrong

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?

I use npm 9.3.1, node v18.14.1 and react scripts 5.0

like image 275
Karolis Avatar asked Feb 02 '26 17:02

Karolis


1 Answers

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.

like image 90
Karolis Avatar answered Feb 05 '26 05:02

Karolis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!