Demo, all content is generated
Question

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

Solved · 382 views · asked by valeria_m · edited

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

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error Found: react@19.1.0
npm error Could not resolve dependency:
npm error peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" from react-day-picker@8.10.1

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 · edited

2 answers

Marked as helpful by the asker
jonas_k · edited

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 · edited
Even better. Unused v0 components are worth a sweep in general. jonas_k · edited
Hit this again with a different package (an old toast library). Same approach, upgrade or remove. mo_saleh · edited
arjun_codes · edited

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