-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Buildng project using only app router #1171
Comments
Probably is related to #1144 about |
Possible, but as far as I can tell in the linked issue the problem is due to the
|
I can confirm this issue, I also get the following error:
It only appears since I deleted the |
I'm also getting a similar issue when upgrading to Next 14 in my team's application. I see the errors on paths. Our application is still using page routes for every URL. |
I'm no expert of this project, but I doubt the example is functional, look at this redirect: redirect(`/${i18n.defaultLocale}/${lang}`) I guess here should be a redirect to the requested path and not to the root, also this EDITI checked, redirect(`/${i18n.defaultLocale}`) I also checked and the example project doesn't work properly under |
I found a solution here that works for me. It requires a few tweaks but overall, all the ingredients are here. |
I see no solution in link you provided. |
In the end I switched to another package because I think this one is not ready yet. I've tried quite hard but without success. I've used next international which worked flawlessly With the new app directory (even with the latest versions of next). |
Tested today ([email protected]) but cannot make this package working. Problems encountered
|
What version of this package are you using?
2.6.2
What operating system, Node.js, and npm version?
node 20.2, npm: 9.6.6
What happened?
I have
When trying to build my application I got an error. It seems when trying to build the
/404
and/505
pages next-translate tries to inject in there or sth and that causes an issue, becauseNextRouter was not mounted.
which could be a sign, that it tries to usenext/router
import in an app router environment where it should usenext/navigation
This is what my
next.config.js
looks like.This is what the
/[lang]/layout.tsx
looks like:When I dont remove
i18n
from the config this is what I get for every route:The text was updated successfully, but these errors were encountered: