You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a NextJS 13 application that uses both the legacy /pages directory and the new /app directory.
Create links that navigate between them.
Add a top level [...catchall] in the /pages directory.
Deploy to Vercel. This bug does not happen in dev. I have yet to confirm if this happens on all next build && next start builds, or if only when deployed to Vercel.
Notice how when navigating between a page originating in /pages towards one in /app, instead the catchall page is hit.
Navigation between /pages to /pages, /app to /app or /app to /pages works as expected.
This is the same issue as in #42513. As @timneutkens explains here #42513 (comment) the expected behaviour is for it to navigate to the catchall route.
#43188 makes sure it works the same in dev and prod.
Currently in dev the `_devPagesManifest` includes the `/app` routes as
well. However, In production, the `_buildManifest.js` does not include
the `/app` routes. This causes the `/pages` router to behave differently
in the two environments.
This change excludes the `/app` routes from `_devPagesManifest` to make
it work the same in dev/prod.
Fixesvercel#42513Fixesvercel#42532
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`
## Documentation / Examples
- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Running in Codesandbox, cannot run
next info
"dependencies": {
"next": "13.0.3-canary.0",
"react": "18.3.0-next-4bd245e9e-20221104",
"react-dom": "18.3.0-next-4bd245e9e-20221104"
},
What browser are you using? (if relevant)
Chrome Version 107.0.5304.88 (Official Build) (64-bit)
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
When navigating from a page in the legacy /pages directory to the new /app directory, a [...catchall] in /pages will take be resolved instead.
Expected Behavior
Navigating from /pages to /app should go to the correct page in /app.
Link to reproduction
https://codesandbox.io/s/catchall-bug-k7x8pi?file=/pages/%5B...catchall%5D.tsx
To Reproduce
Create a NextJS 13 application that uses both the legacy /pages directory and the new /app directory.
Create links that navigate between them.
Add a top level [...catchall] in the /pages directory.
Deploy to Vercel.
This bug does not happen in dev. I have yet to confirm if this happens on all
next build && next start
builds, or if only when deployed to Vercel.Notice how when navigating between a page originating in /pages towards one in /app, instead the catchall page is hit.
Navigation between /pages to /pages, /app to /app or /app to /pages works as expected.
https://csb-k7x8pi-gweyxi0yg-winwardo.vercel.app/
The text was updated successfully, but these errors were encountered: