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
Compatibility with next-connect middlewares #728
Labels
area: integrations
contributions welcome
Good for people looking to contribute
enhancement
New feature or request
Comments
+1. Having this issue as well. |
I don't have experience with |
amannn
added
contributions welcome
Good for people looking to contribute
and removed
unconfirmed
Needs triage.
labels
Feb 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: integrations
contributions welcome
Good for people looking to contribute
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
I prefer to organize my middlewares with next-connect, however after installing next-intl I run into the following issue:
My
redirectMiddleware
did not trigger. I tried several different combinations trying to build a custom wrapper around the i18nMiddleware that normally looks like this:here is one example of the attempt:
https://github.com/hoangvvo/next-connect?tab=readme-ov-file#nextjs-middleware
but this was creating the following error:
It's my first time with
next-intl
so maybe I am missing smth obvious, but been bumping my head against this for few hours, and I can't figure it out, chat-gpt couldn't help as well 😅Describe the solution you'd like
router.use(i18nMiddleware, redirectMiddleware)
orrouter.use(i18nMiddleware).use(redirectMiddleware)
Describe alternatives you've considered
Currently I have this blob that works, but it's hard to look at it (that's why I want to decouple it with next-connect):
The text was updated successfully, but these errors were encountered: