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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: usePathname can return null in layout #763

Open
1 task
zbeyens opened this issue Apr 30, 2024 · 0 comments
Open
1 task

[馃悰 Bug]: usePathname can return null in layout #763

zbeyens opened this issue Apr 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@zbeyens
Copy link

zbeyens commented Apr 30, 2024

next-on-pages environment related information

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
CPU: (10) arm64 Apple M2 Pro
Memory: 32 GB
Shell: /bin/zsh
Package Manager Used: npm (10.5.0)

Relevant Packages:
@cloudflare/next-on-pages: 1.11.1
vercel: N/A
next: N/A

Description

Got this error in my CF deployment null is not an object (evaluating '(0,i.usePathname)().includes'), that do not happen in Vercel deployment.

usePathname() should always return a string.

Reproduction

Render a client component that uses usePathname in a layout RSC in the root page, then use Safari to navigate to that page.

Pages Deployment Method

None

Pages Deployment ID

No response

Additional Information

No response

Would you like to help?

  • Would you like to help fixing this bug?
@zbeyens zbeyens added the bug Something isn't working label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant