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.

namespaceRequired on LoadNamespace(Component)

See original GitHub issue

Hey @isaachinman, here i go again. After the update to v0.36.0 a warn start to appears on my console.

You have not declared a namespacesRequired array on your page-level component: LoadNamespace(Component).

I already look into my page level components and every single one of then is being export with his nameSpace and the also have namespaceRequired on the getInitialProps. Don’t know if this is something about the new version or if this is something a change in the code, hoping that you can give some more info about that. Everything still work as expected.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
RizziWilliamcommented, May 3, 2019

@isaachinman Hey, finally get some time to take a look into this. The problem wasn’t with next-i18next, as i said before this happens when i have a page that is export with others things, the real problem is the withResponsive, it’s a wrapper and when a export the page, let’s say Home, with it i lose the getInitialProps, then it doesn’t get execute by the the _app.jsx. Looking into the next.js docs this is said. That’s the link for the issue in the next GitHub https://github.com/zeit/next.js/issues/7216#event-2316761259. I actually solve this by removing the wrapper and using a context to get the device (desktop, mobile, etc).

0reactions
isaachinmancommented, Apr 4, 2019

Hi @RizziWilliam - sorry, can’t help unless I know what withResponsive is. In general, withNamespaces comes directly from react-i18next and provides the wrapped component with a t (translate) function as a prop. It seems like you’re wrapping a wrapper, which might not be passing props along correctly. Not entirely sure.

The “You have not declared a namespacesRequired array” error is an entirely different issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

namespaceRequired on LoadNamespace(Component) · Issue #222 ...
Hey @isaachinman, here i go again. After the update to v0.36.0 a warn start to appears on my console. You have not declared...
Read more >
declaring namespacesRequired array on page-level component
I've got a project based on next and react, using i18next package I encounter the following warning which I think is the reason...
Read more >
R Packages (2e) - 11 Dependencies: Mindset and Background
onLoad() function. After loading, the package is available in memory, but because it's not in the search path, you won't be able to...
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