Skip to content

Commit

Permalink
docs: Improve troubleshooting docs for missing middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Oct 24, 2023
1 parent 1431501 commit b5884a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/pages/docs/routing/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ module.exports = {
This can happen either because:

1. The middleware was not set up
2. The middleware matcher didn't match a request, but you're using APIs from `next-intl` in a component
2. The middleware was set up in the wrong file (e.g. you're using the `src` folder, but `middleware.ts` was added in the root folder)
3. The middleware matcher didn't match a request, but you're using APIs from `next-intl` in a component

To address the latter case, you should validate that only valid locales are handled by the `[locale]` layout segment since this effectively acts as a catch-all.

Expand Down

2 comments on commit b5884a7

@vercel
Copy link

@vercel vercel bot commented on b5884a7 Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-intl-example-next-13 – ./examples/example-next-13

next-intl-example-next-13-next-intl.vercel.app
next-intl-example-next-13-git-main-next-intl.vercel.app
next-intl-example-next-13.vercel.app

@vercel
Copy link

@vercel vercel bot commented on b5884a7 Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-intl-docs – ./docs

next-intl-docs-git-main-next-intl.vercel.app
next-intl-docs-next-intl.vercel.app
next-intl-docs.vercel.app

Please sign in to comment.