Skip to content
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

Using Link with localeSubpaths not working correctly with dynamic routes #731

Closed
AhmadAlYaaqba opened this issue Jun 4, 2020 · 1 comment

Comments

@AhmadAlYaaqba
Copy link

Describe the bug

when using localeSubpaths and then try to import using Link from next-i18next instance for dynamic route, it will not work, for ex

<Link href="/[dynamicComponent]" as="/test">

i will get the following error on console:

Uncaught (in promise) Error: The provided "as" value (/en/test) is incompatible with the "href" value (/[dynamicComponent]). Read more: https://err.sh/vercel/next.js/incompatible-href-as

Occurs in next-i18next version

"next-i18next": "^4.4.2"

Steps to reproduce

same as the describe of the bug

Expected behaviour

Expected to route me to the correct dynamic routes without issue and add the lang in URL.

OS (please complete the following information)

  • Device: MBP 2015
  • Browser: Chrome 83.0.4103.61
@isaachinman
Copy link
Contributor

Duplicate of #413.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants