Next.js Discord

Discord Forum

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
Open in Discord
Original message was deleted.
Answered by English Spot
react/jsx-runtime should be an external dependency when building
View full answer

2 Replies

Avatar
English Spot
Compiled definition of component :
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
Image
Avatar
English Spot
react/jsx-runtime should be an external dependency when building
Answer