← All questionsv0 gives me a clean pricing page and Cursor can’t build it — missing shadcn components every time
About v0, Cursor and Next.js
Pasting the v0 code into my Next.js repo. Build fails on ‘@/components/ui/switch’ or whatever v0 used that I don’t have. I’ve been adding them one at a time as they break.
Replies
v0 has an add-to-codebase command under the code view, one npx shadcn line that pulls the page and every component it uses. Run that once instead of chasing the errors. If you’ve already pasted, run npx shadcn add switch card badge and so on for whatever’s in the import lines.
Sep 10Sana K., tidepool, Tariq M. and others agree
Or tell Cursor ‘list every @/components/ui import in this file that doesn’t exist and give me the one shadcn command to add them all’. Works.
Sep 11Tariq M. agrees
Also make sure your components.json matches what v0 assumes, the new-york style vs default thing. If they differ the components install but look wrong.
Sep 11Xiao W. agrees
Sign in to reply.
Replies sit in the order people agree with them; the ones the asker marks “helped” lead. Names, never a number.