Cannot name a folder "index" inside the app directory. #69061
Labels
bug
Issue was opened via the bug report template.
create-next-app
Related to our CLI tool for quickly starting a new Next.js application.
Link to the code that reproduces this issue
https://github.com/jazsouf/redirects-test
To Reproduce
Try to build the application with a folder named index with a page.tsx inside the app directory.
Current vs. Expected behavior
Expected to build the page and navigate to the /index route.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 Available memory (MB): 8192 Available CPU cores: 8 Binaries: Node: 22.4.1 npm: 10.8.2 Yarn: N/A pnpm: 9.5.0 Relevant Packages: next: 14.2.5 // Latest available version is detected (14.2.5). eslint-config-next: 14.2.5 react: 18.3.1 react-dom: 18.3.1 typescript: 5.5.4 Next.js Config: output: N/A
Which area(s) are affected?
Routing
Which stage(s) are affected?
next build (local) / vercel build
Additional context
I had an issue with redirecting the home page to the "/index" page. I wanted to reproduce this issue, but actually found what I believe is the root cause: You cannot name a folder "index" inside your app router.
The build error in question:
The text was updated successfully, but these errors were encountered: