Description
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'.
- Set pageExtension to `['tsx', 'ts'] and the problem will be resolved.
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