Same, I encountered this issue too. It happens because your setup doesn’t support modern JS features like nullish coalescing (??) and optional chaining (?.). Here are quick workarounds for this:
- Eject CRA – Run npm run eject to customize Babel and Webpack, but note that you’ll manage all configurations yourself using .babelrc.
- Downgrade @mui/x-charts – Use an older version that works with your current setup.
- Upgrade react-scripts – This will update Babel and Webpack to support modern JS features without downgrading libraries.