Link to the code that reproduces this issue
https://github.com/cosieLq/exampleApp_nextjs/tree/reproduction-double-slash-routing-error
To Reproduce
- Start the application (npm run dev or npm run start)
- Start the gateway (node proxy.js)
- Go to localhost:8000///about
- Observe browser console and see 'Error: invariant: invalid relative URL, router received...'
Current vs. Expected behavior
I expected no error in browser console and the page to render correctly.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.6.0: Wed Jul 31 20:48:52 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6020
Available memory (MB): 16384
Available CPU cores: 12
Binaries:
Node: 20.15.1
npm: 10.7.0
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 15.0.0-canary.179 // Latest available version is detected (15.0.0-canary.179).
eslint-config-next: N/A
react: 19.0.0-beta-04b058868c-20240508
react-dom: 19.0.0-beta-04b058868c-20240508
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Internationalization (i18n), Navigation, Pages Router
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local), Other (Deployed)
Additional context
When i18n is disabled in next.config.js, no error will appear and the page renders correctly.
Link to the code that reproduces this issue
https://github.com/cosieLq/exampleApp_nextjs/tree/reproduction-double-slash-routing-error
To Reproduce
Current vs. Expected behavior
I expected no error in browser console and the page to render correctly.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.6.0: Wed Jul 31 20:48:52 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6020 Available memory (MB): 16384 Available CPU cores: 12 Binaries: Node: 20.15.1 npm: 10.7.0 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 15.0.0-canary.179 // Latest available version is detected (15.0.0-canary.179). eslint-config-next: N/A react: 19.0.0-beta-04b058868c-20240508 react-dom: 19.0.0-beta-04b058868c-20240508 typescript: 5.1.3 Next.js Config: output: N/AWhich area(s) are affected? (Select all that apply)
Internationalization (i18n), Navigation, Pages Router
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local), Other (Deployed)
Additional context
When i18n is disabled in next.config.js, no error will appear and the page renders correctly.