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

fix: command dependency cmdk React 19 support #6644

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

longzheng
Copy link
Contributor

Fixes #6601 #6597 #6200

Using the shadcn CLI npx shadcn@latest add command installs [email protected] which is not compatible with React 19 and has type errors.

Type 'ForwardRefExoticComponent<Children & Pick<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<...>> & { ...; } & { ...; }, "key" | ... 1 more ... | keyof HTMLAttributes<...>> & { ...; } & RefAttributes<...>> & { ...; }' does not satisfy the constraint 'ElementType<any, keyof IntrinsicElements>'.
  Type 'ForwardRefExoticComponent<Children & Pick<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<...>> & { ...; } & { ...; }, "key" | ... 1 more ... | keyof HTMLAttributes<...>> & { ...; } & RefAttributes<...>> & { ...; }' is not assignable to type 'FunctionComponent<any>'.
    Type 'ReactNode' is not assignable to type 'ReactNode | Promise<ReactNode>'.
      Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode | Promise<ReactNode>'.
        Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.ts(2344)

Updating to [email protected](latest version) fixes these errors.

Copy link

vercel bot commented Feb 14, 2025

@longzheng is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@longzheng
Copy link
Contributor Author

Just found this is a duplicate of #6332

@mathi123
Copy link

mathi123 commented Feb 16, 2025

I've closed it, maybe your MR has more luck. Owners don't seem to merge any MRs...

The NextJs starter template has been broken for weeks, frustrating that MRs to fix it get ignored.

Tagging @shadcn and also pointing out #6426 if there could be some info.

Copy link

vercel bot commented Mar 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview Mar 6, 2025 5:18am
v4 ✅ Ready (Inspect) Visit Preview Mar 6, 2025 5:18am

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

Successfully merging this pull request may close these issues.

[bug]: Command Component doesn't compatible with React 19 and Next.js 15
3 participants