-
-
Notifications
You must be signed in to change notification settings - Fork 760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Can't resolve 'fs' when upgrading to 8.0.0 #980
Comments
Hey @pdugan20 and thanks for the first v8 issue! First, your config object should look like this: const path = require('path');
module.exports = {
i18n: {
defaultLocale: 'en',
locales: ['en', 'es'],
},
localePath: path.resolve('./public/static/locales'),
debug: true,
}; Only the NextJs options themselves go in the nested Second, I believe you're getting this error because of your class-based approach. You need to Let me know if that makes sense, and if that indeed fixes the issue. |
Yup that was able to load index.js for me! Thanks! |
Hey thanks again for such a quick response, that was awesome! Everything's working fine but I'm now getting the following issue: Assuming that's on the nextjs side and has nothing to do with your library. |
Not sure exactly what that issue is, but if you're not able to use suspense, you can easily override it. The relevant default value is here. You would want to do something like: const path = require('path');
module.exports = {
i18n: {
defaultLocale: 'en',
locales: ['en', 'es'],
},
localePath: path.resolve('./public/static/locales'),
debug: true,
react: {
useSuspense: false,
wait: true,
}
}; Let me know if that does the trick. |
Oh hey that fixed it too! I'm completely migrated! For whatever reason suspense was throwing errors on the custom _document.js nextjs recommends using for styled-componenets: |
Great, glad to hear it! |
It seems there is a warning related to it: react-i18next:: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour. |
Describe the bug
I'm getting the same issue described here: #935
Any idea what's going wrong?
Occurs in next-i18next version
8.0.0
Steps to reproduce
next.config.js
next-i18next.config.js:
index.js
_app.js
Expected behaviour
Index.js should load with translated content
The text was updated successfully, but these errors were encountered: