Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

middleware reproduction #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

middleware reproduction #1

wants to merge 2 commits into from

Conversation

Enalmada
Copy link
Owner

After spending some time to get reproduction, I narrowed it down to sentry. If I remove sentry from my app, next-on-pages works. If I just add sentry to the apps/middleware-13.2.4 sample it seems to work ok but moving app and middleware under a src directory then cause the 500 and error above for me. So it seems to be a combination of sentry and src directory.

reproduction:

  • Install sentry npx @sentry/wizard@latest -i nextjs. This will create an extra block in next.config.js, some other config files, and some example files. I believe you can take the contents from my reproduction for testing.
  • Move app under /src directory. Adjust tsconfig src "paths": { "@/*": ["./src/*"] }
  • Add ‘/’ to middleware matcher matcher: ['/', '/api/:path*', '/test/:path*'],

Plot twist... Simple reproduction doesn't seem to matter about matcher.
export const config = {
matcher: '/',
};

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

Successfully merging this pull request may close these issues.

1 participant