GUIDES · DEPENDENCIES
pnpm 10 ignored build scripts on Vercel: fix missing native binaries
pnpm 10 skips some dependency install scripts. Diagnose ignored builds that break esbuild, sharp, native packages or generated binaries during a Vercel deployment.
Different problem from an outdated lockfile
Your installation can complete successfully and still leave a native dependency or generated binary unavailable. pnpm 10 introduced tighter controls around dependency lifecycle scripts. A package whose build script was ignored may be present in node_modules but incomplete.
Look in the Vercel install log for messages about ignored build scripts. Do not assume a later cannot find binary error means the package was never installed.
Approve only the dependencies that need scripts
For pnpm 10, use pnpm approve-builds to review scripts and record the decision in workspace configuration. The exact configuration shape depends on the pnpm major version, so pin packageManager in package.json and follow documentation for that version.
Review the package before approving install-time code. Approving every package defeats the safety protection.
{
"packageManager": "pnpm@10.32.0"
}
# Run locally, review the prompts, and commit config + lockfile
pnpm approve-builds
pnpm installMake local and Vercel installs match
Use Corepack and the same pinned pnpm major locally and on Vercel. Reinstall in a fresh checkout rather than trusting existing node_modules. Commit pnpm-lock.yaml and pnpm-workspace.yaml changes produced by your reviewed approval.
A frozen lockfile mismatch has a different fix: regenerate the lockfile. Approvals are for lifecycle scripts, not a substitute for dependency integrity.
Confirm the package actually works
Run the normal production build and, if needed, a tiny smoke test that imports the native package in a Linux environment. Some failures only occur when a function starts, not when it bundles.
Reference: pnpm documentation for approve-builds. DeployDoctor can flag pnpm configuration risks; inspect the install log for the actual ignored package list.
Updated 2026-10-21