vercel / next.js

The React Framework
https://nextjs.org
MIT License
127.09k stars 27.01k forks source link

optional catch all root route doesn't work when `concurrentFeatures` is enabled #34351

Closed vndre closed 2 years ago

vndre commented 2 years ago

Run next info (available from version 12.0.8 and up)

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Wed Aug 25 23:20:18 UTC 2021
Binaries:
  Node: 17.4.0
  npm: 8.3.1
  Yarn: N/A
  pnpm: 6.30.1
Relevant packages:
  next: 12.0.10
  react: 18.0.0-rc.0-next-fe905f152-20220107
  react-dom: 18.0.0-rc.0-next-fe905f152-20220107

What version of Next.js are you using?

12.0.10

What version of Node.js are you using?

17.4.0

What browser are you using?

chrome

What operating system are you using?

linux

How are you deploying your application?

next dev

Describe the Bug

Optional catch all route at pages/[[...slug]] works fine on latest version until I enable concurrentFeatures in next.config

Expected Behavior

I should be able to catch the index and all routes using concurrentFeatures option.

To Reproduce

repo to reproduce it: https://github.com/vndre/catch-all-next12

1) browse to localhost:3000/... catch all route should work for any route. 2) uncomment line 4 to 6 in next.config.js 3) next throws error: You cannot define a route with the same specificity as a optional catch-all route ("/" and "/[[...slug]]").

balazsorban44 commented 2 years ago

This seems to have been fixed on canary already! Please upgrade if you want to try it now.

github-actions[bot] commented 2 years ago

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.