Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior for usePathname between local and deployed (on Vercel) #65526

Open
mastoj opened this issue May 8, 2024 · 0 comments
Open
Labels
bug Issue was opened via the bug report template.

Comments

@mastoj
Copy link
Contributor

mastoj commented May 8, 2024

Link to the code that reproduces this issue

https://github.com/mastoj/usepathname-sample

To Reproduce

  1. Go to https://usepathname-sample.vercel.app (deployed app on Vercel)
  2. Note the href value of the green link.
  3. Clone repo
  4. npm run dev
  5. Go to https://localhost:3000
  6. Note the href value of the green link.

Current vs. Expected behavior

The href differ between the local version and deployed version, and I expected them to not differ.

The version I expected was the one running locally, but the biggest issue in my opinion is the inconsistencies between local and production on vercel in this case.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020
  Available memory (MB): 65536
  Available CPU cores: 12
Binaries:
  Node: 18.17.0
  npm: 9.6.7
  Yarn: 1.22.21
  pnpm: 8.6.10
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  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

No response

@mastoj mastoj added the bug Issue was opened via the bug report template. label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

1 participant