Set up a new Next.js project with shadcn/ui correctly — new-york style, radix primitives, Geist font fix, dark theme
Run through each step in order. Do not skip any.
Read components.json. If it doesn't exist, stop and tell the user to run npx shadcn@latest init first.
If it exists, ensure:
"style" is "new-york" — if it says "base-nova", change it immediately"tsx" is true"ui": "@/components/ui", "hooks": "@/hooks", "utils": "@/lib/utils"Run grep "@base-ui/react" package.json. If found:
npm uninstall @base-ui/reactgrep -r "@base-ui/react" src/ to find any component files still importing itget_component MCP tool)Verify radix-ui is in dependencies. If not, run npm install radix-ui.
Read src/app/globals.css. Check the @theme inline block.
Problem: --font-sans: var(--font-geist-sans) in @theme inline fails because Next.js injects --font-geist-sans at runtime, but Tailwind v4 resolves @theme at build time.
Fix: In the @layer base block, set font-family directly:
@layer base {
* {
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
}
html {
font-family: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;
}
code, pre {
font-family: var(--font-geist-mono), ui-monospace, monospace;
}
}
Do NOT use @apply font-sans in the html rule — it won't resolve correctly.
Read src/app/layout.tsx. Ensure:
variable prop on <html> classNameclassName="dark" on <html>)TooltipProvider (sidebar's SidebarProvider includes one)Run npm run build. It should complete with zero TypeScript errors. If any component fails with Cannot find module '@base-ui/react/...', that component still needs replacing (go back to Step 2).
Report the result to the user.