vercel / next.js

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

Custom `basePath` causes hard navigation to home route when deployed on Vercel #64903

Closed mikecripps closed 1 month ago

mikecripps commented 1 month ago

Link to the code that reproduces this issue

https://github.com/mikecripps/nextjs-basepath

To Reproduce

  1. Open the about page
  2. Click "Home"

Current vs. Expected behavior

Current

Expected

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 32689
  Available CPU cores: 16
Binaries:
  Node: 18.18.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.2 // Latest available version is detected (14.2.2).
  eslint-config-next: 14.2.2
  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)

Not sure

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

This issue can be reproduced when deployed on Vercel but can't be reproduced when running locally using next start or next dev

Note that starting from the home route / or any subsequent navigations after landing on / perform a soft navigation as expected.

github-actions[bot] commented 4 weeks ago

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.