question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Error Thrown on Next Build

See original GitHub issue

Expected behavior

Chart.Js should work on Next Build

Current behavior

With NextJS, the library works well on development. But an error is thrown after running the app after building it. RangeError: minimumFractionDigits is out of range

I’m using also the react-chartjs-2.

I opened an issue on react-chartjs-2 repo, but then have been told the error comes from the chartjs library itself.

Reproducible sample

https://github.com/LouisJackson/react-chart-test

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

v3.9.1

Browser name and version

No response

Link to your project

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

34reactions
kurklecommented, Sep 15, 2022

swcMinify: false in next.config.js makes it work.

6reactions
indralukmanacommented, Sep 23, 2022

Hi everyone, I reported this issue in the swcMinify feedback discussion here:

https://github.com/vercel/next.js/discussions/30237#discussioncomment-3717121

referencing this issue with sample repo from @LouisJackson

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Features: Error Handling - Next.js
Handle errors in your Next.js app. ... Render a fallback UI after an error is thrown; Provide a way to reset the Application's...
Read more >
Next.js project error in production build - Stack Overflow
To fix this error, identify the source of the erroneous NODE_ENV value and get rid of it: Next.js automatically sets the correct value...
Read more >
Testing and error handling patterns in Next.js - LogRocket Blog
Errors in development​​ This error is not visible in production, and it is only thrown when the development server is running. The error...
Read more >
Error handling - Apollo GraphQL Docs
Making errors actionable on the client and server · Built-in error codes · Custom errors · Throwing errors · Omitting or including stacktrace...
Read more >
Error Boundaries - React
In the past, JavaScript errors inside components used to corrupt React's internal state and cause it to emit cryptic errors on next renders....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found