Comments (2)
I encountered a similar problem in my project as well. After some messing around, it appears that the issue might be related to NextUI, Because I do have another component library in the project too and that worked fine.
I found a workaround for the issue by patching all instances of router.open in the NextUI. Sending additional href in the parameter to the function call, since I noticed the router interface contains
interface Router {
isNative: boolean;
open: (target: Element, modifiers: Modifiers, href: Href, routerOptions: RouterOptions | undefined) => void;
useHref: (href: Href) => string;
}
It seems to resolve the issue for me
I use pnpm to patch all of these occurrence
@nextui-org/use-aria-link
- router.open(e.currentTarget, e);
+ router.open(e.currentTarget, e, e.currentTarget.href);
@nextui-org/use-aria-menu
- router.open(e.target, e);
+ router.open(e.target, e, e.target.href);
@nextui-org/pagination
- router.open(e.currentTarget, e);
+ router.open(e.currentTarget, e, e.currentTarget.href);
Then, finally, don't forget to clear your webpack cache or delete your .next folder
This workaround may not be the optimal solution and there's a possibility it could introduce other issues, I haven't looked deep into it, because I need to get my project working in time 😅
EDIT: Seem like there is a PR to fix this now on NextUI repo: nextui-org/nextui#2943
from next.js.
@YuzuZensai Thanks for helping me out.
from next.js.
Related Issues (20)
- Dockerfile [4/4] Step 6/14 - /app/public no such file or directory HOT 2
- Cannot build in versions after [email protected]
- Property overrideSrc of image component (next/image) does not override srcset property HOT 2
- Next Build fails with start <= end assertion failed HOT 4
- Unused dependencies in standalone build using storybook
- Warning: React does not recognize the `fetchPriority` prop on a DOM element. HOT 1
- Error occurred prerendering page "/_not-found" with pageExtensions option HOT 8
- `next/og` cause memory leak in production standalone build HOT 1
- Multiple loading.tsx files causes extra transition when revalidating with server actions on 14.2.x+
- No official way to enable turbopack with custom server
- CSS order incorrect with the combination of server and client components HOT 3
- next.js typescript plugin autocomplete not working for `viewport`
- [Parallel and Intercepted Dynamic Routes] Will intercept normal routing HOT 2
- output export ssg generation for dynamic even with generateStaticParams id value is comming as %5Bslug%5D so page is not generated in build HOT 1
- Docs: Some Tags in "Layouts and Templates" page are not showing properly in the Firefox browser HOT 2
- Docs: Link documentation - Remove 'With URL Object' section HOT 2
- context
- Parallel route RSC does not unmount when navigating back to a `default.tsx` HOT 5
- Next build perf issue with long string `.concat` function
- The __debugSource attribute is missing from the React Fiber instance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.