Question

v0 project fails on deploy: ERESOLVE unable to resolve dependency tree (react 19)

Solved · 384 viewsasked by valeria_m

Downloaded my v0 project, pushed to GitHub, imported in Vercel:

I don't even know what react-day-picker is.

What I’ve tried

Ran npm install locally, same error. Tried deleting package-lock.json.

Comment
same thing happened with a v0 project that used the date picker thiago_n

2 answers

Marked as helpful by the asker
jonas_k

react-day-picker is behind the shadcn Calendar component v0 added. Version 8 declares support up to React 18, and npm refuses to install it next to React 19.

Proper fix: upgrade it. v9 supports React 19, and the current shadcn calendar is written for v9:

npm install react-day-picker@latest
npx shadcn@latest add calendar --overwrite

Quick unblock if you have a deadline: an .npmrc in the repo root with

legacy-peer-deps=true

Vercel reads that file too. It works because v8 runs fine on React 19 in practice, but you're hiding the warning, not fixing it.

Comment
I don't use the calendar anywhere so I just deleted the component and uninstalled the package. Deployed! valeria_m
Even better. Unused v0 components are worth a sweep in general. jonas_k
Hit this again with a different package (an old toast library). Same approach, upgrade or remove. mo_saleh
arjun_codes

Also check you don't have both package-lock.json and pnpm-lock.yaml in the repo. v0 exports sometimes include one, and Vercel picks the package manager based on the lockfile it finds. Mixed lockfiles give confusing install errors.

Comment