-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
bug: ui-add doesn't set the import paths properly when adding a component #1035
Comments
What component did you add? |
shadcn cli generally isnt the best at handling monorepos but i thought we got the last issues sorted :/ |
The command component (needs Dialog, imported as |
I'm also seeing an import mistake. Newly added components have the incorrect cn import. Example: Expecting: |
could be solved by this method: shadcn-ui/ui#3854 (comment) |
@xzedx thank you for the link. can you tell us what is the content of your |
Is there any update regarding this issue? |
Provide environment information
System: OS: Windows 10 10.0.19045 CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor Memory: 17.53 GB / 31.92 GB Binaries: Node: 22.1.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD pnpm: 9.1.1 - ~\AppData\Local\pnpm\pnpm.EXE Watchman: 20210110.135312.0 - c:\programdata\chocolatey\bin\watchman.EXE
Describe the bug
When using pnpm ui-add the added component doesn't have a correct import path.
`"use client";
import * as React from "react";
import { type DialogProps } from "@radix-ui/react-dialog";
import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
import { Command as CommandPrimitive } from "cmdk";
import { Dialog, DialogContent } from "src//dialog";
import { cn } from "@acme/ui";`
The import should be ./dialog and not src//dialog
Link to reproduction
https://github.com/t3-oss/create-t3-turbo
To reproduce
use pnpm ui-add and select the Command component
Additional information
No response
The text was updated successfully, but these errors were encountered: