Routes are broken when the page extension contains only 'tsx'. #65040
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
Pages Router
Related to Pages Router.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Link to the code that reproduces this issue
https://github.com/thecuvii/page-extensions-repro
To Reproduce
Create a new TypeScript app.
Set
pageExtensions
to['tsx']
in next.config.js.Visiting
localhost:3000
will result in an error page with the message: 'pageExtensions.map is not a function'.Current vs. Expected behavior
The router works when the
pageExtensions
are set to['tsx']
.Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 Available memory (MB): 65536 Available CPU cores: 10 Binaries: Node: 20.12.2 npm: 10.5.0 Yarn: N/A pnpm: 9.0.5 Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Pages Router, Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
NEXT-3244
The text was updated successfully, but these errors were encountered: