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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With