3

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

A-Tech
  • 806
  • 6
  • 22
Karolis
  • 255
  • 3
  • 15

1 Answers1

1

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.

Karolis
  • 255
  • 3
  • 15