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

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected 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

Tried to setup the easiest example possible on the repo.

Reproduction

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

chart.js version

v3.9.1

react-chartjs-2 version

v4.3.1

Possible solution

No response

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
LeeLenaleeecommented, Sep 22, 2022

Putting swcMinify: false in next.config.js will resolve the issue.

1reaction
jvandenaardwegcommented, Nov 21, 2022

Had the same issue, and fixed it by using swcMinify: false as stated above.

Just here to say the issue seems fixed in NextJS 13, so you can remove swcMinify: false when you use NextJS 13

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Thrown on Next Build · Issue #10673 · chartjs/Chart.js
With NextJS, the library works well on development. But an error is thrown after running the app after building it. RangeError: ...
Read more >
javascript - Error when running next build - Stack Overflow
here is the error that it's throwing: > next build (node:8136) DeprecationWarning: Tapable.plugin is deprecated.
Read more >
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 >
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 >

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