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

Error: navigation.usePathname is not a function #58

Closed
begalinsaf opened this issue Apr 25, 2024 · 4 comments
Closed

Error: navigation.usePathname is not a function #58

begalinsaf opened this issue Apr 25, 2024 · 4 comments

Comments

@begalinsaf
Copy link

can you help me with this error

Error: navigation.usePathname is not a function

im in Nextjs 14.2.2 intalled with Bun

@hideyuki
Copy link

hideyuki commented Apr 27, 2024

@begalinsaf
Same issue
It may be necessary to use it only for the client component

Please try to put 'use client' on top of the code that uses the ProgressBar tag

@bick
Copy link

bick commented Apr 29, 2024

@hideyuki @begalinsaf I was able to fix this when working with the layout.tsx file is you need to use the Second approach wrap in a use client Providers component.

Docs here (scroll down): https://www.npmjs.com/package/next-nprogress-bar#exemple-with-applayout

@begalinsaf
Copy link
Author

I've done all the configuration for the app router, including 'use client' on the provider, but I don't know what's causing the issue. Maybe there's a conflict between my code and this package, but for now, I'm using nextjs-toploader. I'll close this issue. Thank you, everyone.

@f-steel
Copy link

f-steel commented Jul 10, 2024

had the same issue as you and also now using the other package @begalinsaf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants