Replies: 1 comment
-
seeing the exact same thing, thanks for posting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is about using a monorepo setup with new CLI.
Recently I was trying to use the new monorepo feature on the CLI with my existing next.js monorepo project. I have the name of the
packages/ui
package set as@mycompany/ui
. I found that changing@workspace
namespace to some other (for example,@mycompany
) would break importing the utils.For example, in the standard example, scattered by
bunx --bun shadcn@canary init
(as described here),card
component:cd apps/web bunx --bun shadcn@canary add card
would scatter the
card.tsx
into thepackages/ui/src/components/card.tsx
file, no problems.But if change the
@worksapce
to something else throughout the code (@mycompany
for instance), and re-run the add CLI the import ofcn
in thecard.tsx
would become incorrect. It will becomeimport { cn } from "@mycompany/lib/utils"
instead of
import { cn } from "@mycompany/ui/lib/utils"
Changing
@mycompany
back to@workspace
would fix it back.import { cn } from "@workspace/ui/lib/utils"
Beta Was this translation helpful? Give feedback.
All reactions