Personal component library works fine with react 19 apps but crashes in NextJS 15 with react 19
Answered
English Spot posted this in #help-forum
Original message was deleted.
Answered by English Spot
react/jsx-runtime should be an external dependency when building
2 Replies
English Spot
Compiled definition of component :
One of the pages where the error occurs:
stack trace
function Gt({ className: e, variant: o, size: t, ...n }) {
return /* @__PURE__ */ E.jsx("button", { className: Kt({ variant: o, size: t, className: e }), ...n });
}
One of the pages where the error occurs:
import Link from "next/link";
import { Button } from "@rinzai/zen";
export default function Home() {
return (
<main className="min-h-[--remaining-height] flex flex-col items-center justify-center gap-10 text-foreground">
<h1>Welcome</h1>
<Link href="/dashboard">
<Button>Go to Dashboard</Button>
</Link>
</main>
);
}
stack trace
English Spot
react/jsx-runtime should be an external dependency when building
Answer