This is a common Vercel deployment error. Your pnpm-lock.yaml is out of sync with package.json because you added @types/d3 as a dependency but didn’t regenerate the lockfile.
Fix: Run this locally, then commit and push:
pnpm install
git add pnpm-lock.yaml package.json
git commit -m "update lockfile"
git push
This will regenerate pnpm-lock.yaml to include the new @types/d3 dependency, and the Vercel build should pass.
The v0 preview environment automatically regenerates the lockfile when package.json is modified -- you don't need to run any terminal commands. Let me trigger a fresh dependency resolution by re-saving the package.json:
That edit to package.json will trigger v0's build system to regenerate pnpm-lock.yaml with all dependencies (including @types/d3 and d3) properly resolved. You don't need to run any terminal commands -- the v0 preview handles lockfile sync automatically whenever package.json changes. The app should now build cleanly.
An error occurred during deployment. Please fix:
Running build in Washington, D.C., USA (East) – iad1 (Turbo Build Machine)
Build machine configuration: 30 cores, 60 GB
Retrieving list of deployment files...
Previous build caches not available.
Downloading 80 deployment files...
...
* 1 dependencies were added: @types/d3@^7
* 1 dependencies are mismatched:
- d3 (lockfile: ^7.9.0, manifest: ^7)
Error: Command "pnpm install" exited with 1
The build error is because I changed d3 from ^7.9.0 to ^7 in my previous edit, causing a mismatch with the lockfile. I need to restore it to the original version that matches the lockfile.
Restored d3 to ^7.9.0 to match the existing lockfile. The @types/d3@^7 addition will be picked up as a new dependency during the fresh install. This resolves both the version mismatch and the missing dependency errors from the build log.
Still a lockfile mismatch — now it’s d3 itself (lockfile has ^7 but package.json has ^7.9.0).
Same fix — regenerate the lockfile locally:
pnpm install
git add pnpm-lock.yaml package.json
git commit -m "sync lockfile with package.json"
git push
If that keeps failing, you can also try deleting and regenerating:
rm pnpm-lock.yaml
pnpm install
git add pnpm-lock.yaml package.json
git commit -m "regenerate lockfile"
git push
Alternative quick fix — add this to your Vercel project settings under Settings → General → Build & Development Settings → Install Command:
pnpm install --no-frozen-lockfile
This bypasses the strict lockfile check on Vercel. It’s fine for most projects, though regenerating the lockfile properly is the cleaner solution.
You can send messages while the preview loads