Open wesleyhitson opened 10 months ago
@dlford created this issue to update packages.
Getting an error after updating to Next.js 13, apparently I'm not the only one:
Error: Hydration failed because the initial UI does not match what was rendered on the server.
https://stackoverflow.com/questions/71706064/react-18-hydration-failed-because-the-initial-ui-does-not-match-what-was-render Check out the answer from hansaplast (or Ctrl+f "Next.js 13").
I disabled my browser extensions to make sure it wasn't related to anything they were doing. The site text is also randomly getting translated to different languages, and the language dropdown is on the left side of the page, so I think updating may have broken several things. I am going to try to solve all the issues:
@wesleyhitson you might find some good information here on the upgrade - https://nextjs.org/docs/pages/building-your-application/upgrading/version-13
@dlford I looked through that and that helped, thank you. I was able to fix the hydration error, and the language menu seems to be in the correct location.
Maybe you can help me understand more about the i18n setup. When running in localhost, when I click on a different page, in the right menu, the new page loads, but in the first language available for translation. When I refresh the page, it loads with the correct language. The translated pages seem to still be under the "normal" URLs (as opposed to /[country code]/[page name]). The right menu also has a mix of languages in it.
Additionally, I can select different languages from the dropdown, but the language translated to appears to be random. It almost seems like i18n is conflicted with itself somehow.
@wesleyhitson that is strange, is your locale translated or missing? The default locale is en-US, so if your locale is not translated it should show it in en-US as a fallback.
I checked that and that was indeed my locale, so I'm not sure. Could be a weird bug with the Nextjs 13 upgrade. Funny enough I saw Nextjs 14 was just released. 13's big thing seems to be getting everyone to switch the application structure to use an app/ folder, and I'm not so sure I want to restructure the whole project just for that haha. Let me see if I'm still getting the translation behavior if I don't do any updates at all. I'll get back to you @dlford
Contact Details
wesleyhitson106@gmail.com
Explain the proposed feature
Update packages. The main update is a major Next version. This will eliminate several vulnerabilities.
Explain the possible use cases for the feature
Fewer vulnerabilities.
Any other details you would like to provide?
No response