Solving Turborepo + Bun Workspace Dependency & Script Issues #6465
nithin-raj-9100
started this conversation in
Show and tell
Replies: 3 comments 2 replies
-
For bun we shouldn't use pnpm to install packages:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Ya I cant even create a project with bun gives me this
|
Beta Was this translation helpful? Give feedback.
1 reply
-
First, I ran the following command to create the project: bunx create-turbo@latest -e with-tailwind [name] Then, I navigated to the packages/ui directory and created the ShadCN UI config file with the following content: {
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "../tailwind-config/tailwind.config.ts",
"css": "src/styles.css",
"baseColor": "zinc",
"cssVariables": true
},
"iconLibrary": "lucide",
"aliases": {
"components": "@repo/ui/components",
"utils": "@repo/ui/lib/utils",
"hooks": "@repo/ui/hooks",
"lib": "@repo/ui/lib",
"ui": "@repo/ui/components"
}
} After setting that up, I initialized ShadCN UI and added components with the following commands: bunx shadcn@canary init
bunx shadcn@canary add [component-name] |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Critical Fixes & Cleanup Steps 🧹
1. Root
package.json
FixesWhy it mattered:
workspaces
is required for Bun's workspace resolutionFiles to remove
rm -rf pnpm-*
Final Directory Structure
This battle-tested configuration now runs Next.js + shadcn/ui with:
Adding shadcn/ui Components 🎨
Add Components to Your Project
Run the add command in your app directory:
cd apps/web bunx --bun shadcn@canary add [COMPONENT]
What Happens:
Components are installed under packages/ui/src/components
Import paths are automatically updated in apps/web
Importing Components
Import components from the shared UI package:
These changes should work without any error
Beta Was this translation helpful? Give feedback.
All reactions