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

@netlify/plugin-nextjs 5.9.3 breaks client-side navigation #2756

Open
aleehedl opened this issue Feb 6, 2025 · 1 comment
Open

@netlify/plugin-nextjs 5.9.3 breaks client-side navigation #2756

aleehedl opened this issue Feb 6, 2025 · 1 comment

Comments

@aleehedl
Copy link

aleehedl commented Feb 6, 2025

When my Next.js site using pages router has i18n enabled, has middleware and has rewrites, the client-side navigation doesn't work properly for non-default locales (fi) with @netlify/plugin-nextjs version 5.9.3 and 5.9.4.

What happens:

  1. Open https://deploy-preview-4--jovial-salmiakki-51d4db.netlify.app/fi
  2. Hover on link "toinen" and see (in devtools network tab) how 404 is returned in the prefetch
  3. Click on link "toinen" -> a full page reload happens

What I expected to happen:

  • In step 2 I expect the prefetch to return the page props instead of 404.
  • In step 3 I expect the client-side navigation to work.

If you switch to the default locale (English) the same does not happen. Also, when you downgrade to plugin version 5.9.2 the problem disappears: https://deploy-preview-3--jovial-salmiakki-51d4db.netlify.app/fi

Minimal reproduction repository here:
https://github.com/aleehedl/netlify-next-plugin-error

@aleehedl
Copy link
Author

aleehedl commented Feb 7, 2025

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

1 participant