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.

Error: locales must be configured in Next.js

See original GitHub issue


I’m starting to do the migration to next-multilingual from next-I18next and after adding the custom doc i get this error.

Here is the log : Error: locales must be configured in Next.js at getActualLocale (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\next-multilingual\lib\index.js:94:15) at MyDocument.render (webpack-internal:///./pages/_document.tsx:28:140) at finishClassComponent (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5666:31) at renderClassComponent (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5699:3) at renderElement (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5946:7) at renderNodeDestructiveImpl (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:6107:11) at renderNodeDestructive (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:6079:14) at renderContextProvider (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:5923:3) at renderElement (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:6020:11) at renderNodeDestructiveImpl (E:\Documents\SITES\TC Renhouse\tc-renhouse\node_modules\react-dom\cjs\react-dom-server-legacy.browser.development.js:6107:11)

Could someone point me in the right direction ?

Thanks !

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

nbouvrettecommented, Jul 20, 2022

We’re also non-native English speakers but happy to help proof/review any PR you can send our way!

dube25commented, Jul 20, 2022

@NitrousBGC : On a side note, this project does not have a migration guide from next-I18next , which would be a great addition to help others make the move.

If by any chance you’ve documented your steps, sharing it would be a great way to contribute to the community. Docs are located here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Features: Internationalized Routing - Next.js
Next.js has built-in support for internationalized (i18n) routing since v10.0.0 . You can provide a list of locales, the default locale, and domain-specific ......
Read more >
Localizing Your Next.js App - Smashing Magazine
Instructing Next.js your app intends to have routes for different locales (or countries, or both) could not be more smooth. On the root...
Read more >
[i18n] Prefix for default locale - vercel/next.js - GitHub
I would like to ask for the feature basically proposed here: #17078 (comment) by @Vadorequest, which is to optionally enable a prefix for...
Read more >
Next.js: Adding Localization with Next-Intl - This Dot Labs
Using next-intl works right away with minimal setup and configuration, and makes adding different locales to a new or existing project a breeze....
Read more >
Next.js internationalization (i18n) tutorial - Localizely
Set up internationalization in Next.js app with the built-in support for internationalized routing and with react-intl for translations 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 Post

No results found

github_iconTop Related Hashnode Post

No results found