Symptoms
- Errors like "Module not found: @/components/ui/button"
- The layout shows up but has no styling
- Icons are missing or cause errors
- The page crashes with an error about hooks or client components
Why it happens
v0 builds components on top of shadcn/ui, Tailwind CSS and a few small packages for icons and class names. Inside v0, all of that is already set up.
Your project may not have the same pieces, or it may have different versions. The component code is usually fine. The setup around it is different.
Try this first
-
Add the missing UI components
If the code imports from @/components/ui, add those components to your project with the shadcn command. List the ones the error mentions.
npx shadcn@latest add button card input -
Check the @ import path
The @ sign is a shortcut to your project folder. It has to be set in tsconfig.json. If your code lives in a src folder, use ./src/* instead.
{ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./*"] } } } -
Make sure Tailwind sees the new files
If the component has no styles, Tailwind may not be looking at the folder where you saved it. Check that your Tailwind setup includes that folder.
-
Install the small helper packages
Most v0 components use these. Install them if they are missing.
npm install lucide-react clsx tailwind-merge -
Mark interactive components as client components
If you use the Next.js app folder and the component uses useState, useEffect or click handlers, add this line at the very top of the file.
'use client'
When to stop and call a person
Bring in a person if your project uses a different design system, if React or Next.js versions clash, or if you are pasting many v0 screens into one app and they all look slightly different. Making them feel like one product is a design and code job.
Questions people ask
Do I need shadcn/ui to use v0 code?
It is the easiest way. You can rewrite the components to use your own UI kit, but that takes more work.
Why do my v0 pages all look a bit different?
Each generation picks its own spacing and sizes. Set shared styles and reuse the same components across pages to make them match.