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.

after updating react 18, i have problems with date-fns

See original GitHub issue

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

“react”: “18.1.0”, “next”: “12.1.6”, “react-dom”: “18.1.0”, “date-fns”: “2.28.0”,

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

I get errors after the update, this is related to the time zone, there are countries where they do not receive these errors)

react-dom.production.min.js:119 Uncaught Error: Minified React error #425; visit https://reactjs.org/docs/error-decoder.html?invariant=425 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at d7 (react-dom.production.min.js:119:38) at gt (react-dom.production.min.js:206:80) at h6 (react-dom.production.min.js:281:80) at h5 (react-dom.production.min.js:280:438) at h3 (react-dom.production.min.js:280:315) at h2 (react-dom.production.min.js:280:172) at hT (react-dom.production.min.js:268:193) at A (scheduler.production.min.js:14:181) at MessagePort.g (scheduler.production.min.js:15:101)

react-dom.production.min.js:148 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at fp (react-dom.production.min.js:148:277) at _ (react-dom.production.min.js:293:444) at h5 (react-dom.production.min.js:280:375) at h3 (react-dom.production.min.js:280:315) at h2 (react-dom.production.min.js:280:172) at hT (react-dom.production.min.js:268:193) at A (scheduler.production.min.js:14:181) at MessagePort.g (scheduler.production.min.js:15:101)

react-dom.production.min.js:293 Uncaught Error: Minified React error #423; visit https://reactjs.org/docs/error-decoder.html?invariant=423 for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at _ (react-dom.production.min.js:293:137) at h5 (react-dom.production.min.js:280:375) at h3 (react-dom.production.min.js:280:315) at h2 (react-dom.production.min.js:280:172) at hU (react-dom.production.min.js:271:69) at hT (react-dom.production.min.js:268:409) at A (scheduler.production.min.js:14:181) at MessagePort.g (scheduler.production.min.js:15:101)

Expected Behavior

To Reproduce

on react version 17.0.2 didn’t get such errors

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
guilleigmucommented, Jun 30, 2022

Problem seems to be related with Dates (not date-fns only). I’ve also been working on a project using react-18 and next.js 12.2.0 and we’ve only been facing this issue since we added a native Date object in our pages.

Looking forward to have some spare time to prepare a little repo example for you @balazsorban44, but I believe any nextjs project using react-18 and has any kind of Date in some of its static pages will do the trick.

4reactions
olajcommented, Jul 7, 2022

I also have this issue. I managed to fix some of them that was clearly date related but i still get the error on almost all pages but only for mobile users.

The thing that makes it very hard, and time consuming to debug is that no matter what I’ve tried i can only reproduce it in production. I’ve tried to run the docker locally and so on but i can’t reproduce it 😕

You can see the issue if you go to https://alternativeto.net, open the inspector and use the “mobile emulator”, then if you refresh the page it throws these errors.

Is it possible to get any hint from the console there? It seems to only be react code and no hints for poor me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Can't resolve '@date-io/date-fns'
I tried installing the last version of date-io/date-fns, then tried the version 2.0.0 and version 1.0.0 and I still get the same error....
Read more >
date-fns - modern JavaScript date utility library
date-fns provides the most comprehensive yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.
Read more >
Upgrade to react 18 — Issues and resolution - Dev Genius
Everything looked fine after this, but I realized that Link tag inside BrowserRouter changes only the URL, but does not render the component....
Read more >
automatic date formatting in translations (i18next + date-fns)
Update April 2022 Since October '21, i18next has added support for formatting ... We will be using React together with i18next and date-fns....
Read more >
The future of rendering in React
Understand what are the problems with current rendering patterns in React, and how the new rendering patterns introduced with React 18 and ......
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