Skip to content

Commit

Permalink
docs: Clarify middleware error
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Aug 29, 2024
1 parent bb61720 commit 99a3545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/pages/docs/routing/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ This can happen either because:
1. You're using a setup _with_ [i18n routing](/docs/getting-started/app-router) but the middleware is not set up.
2. You're using a setup _without_ [i18n routing](/docs/getting-started/app-router) but are reading the `locale` param passed to the function within `getRequestConfig`.
3. The middleware is set up in the wrong file (e.g. you're using the `src` folder, but `middleware.ts` was added in the root folder).
4. The middleware matcher didn't match a request, but you're using APIs from `next-intl` in a component.
4. The middleware matcher didn't match a request, but you're using APIs from `next-intl` in server code (e.g. a Server Component, a Server Action, etc.).
5. You're attempting to implement static rendering via [`force-static`](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic).

To recover from this error, please make sure that:
Expand Down

0 comments on commit 99a3545

Please sign in to comment.