-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
Cannot destructure property components
of 'undefined' or 'null'.
#661
Comments
Can you please provide a reproducible repository? |
It seems to occur only when So let's say |
@safakcosar how did you get to solve yours? |
Please, let us know if you found any solution. |
I encountered the same problem when I deployed my application on AWS beanstalk. It turns out I simply forgot to add a step that copies the |
Hey @Exilz, a quick question: what was the path of the |
Hi, in my case I just had to add this
|
does anyone found any solution for this? |
Hi @nikishah499, I have a similar problem when I deploy my app on Vercel... Have you figured out a solution? FTR: It seems to be related to using >= |
This seems to work for me (using an older version of next-i18next, v5): const localePath =
typeof path.resolve === "function"
? path.join(process.cwd(), `public/locales`) //path.resolve("./public/locales")
: "/locales";
const i18nInstance = new I18N({
defaultLanguage: "en",
otherLanguages: ["fr"],
localeSubpaths: {},
localePath,
}); In particular it seems that the "browser" localePath should be correct. Previously I was using |
I get this error when I run yarn dev, If there is any solution |
Also, this error might come if you try to import the backend package/file on the Frontend. Just remove them if you might import them mistakenly. |
@rimoza im just rerun ' npm run dev ' in my terminal and that will be normal again |
I completed my project by using next-i18next. The project is working fine on local server. After I deployed the project to the server, firebase function console is giving me this error.
TypeError: Cannot destructure property
componentsof 'undefined' or 'null'. at Server.renderToHTMLWithComponents (/srv/node_modules/next/dist/next-server/server/next-server.js:560:37) at Server.renderErrorToHTML (/srv/node_modules/next/dist/next-server/server/next-server.js:821:35) at <anonymous>
If I remove the codeline "appwithtranslation" from _app.js the page is loading without translation on the server.
i18n.js
server.js
Is there any solution that I can fix this problem?
The text was updated successfully, but these errors were encountered: