GUIDES
Why it works locally
and fails on Vercel.
One page per failure class, with the fix. Every guide ends with a scan, which is free for public repositories.
- Next.js works locally but fails on Vercel: the five usual causesA passing local build proves less than you think. The five reasons a Next.js app works on your machine and fails on Vercel, with the fix for each.
- process.env is undefined on Vercel: how to find the missing variableYour env variable works locally and is undefined on Vercel. Where Vercel reads variables from, why NEXT_PUBLIC values need a rebuild, and how to list what your code expects.
- Module not found on Vercel but it works locally: case sensitive importsThe import resolves on macOS and fails on Vercel with Module not found. Why Linux cares about casing, how to find the mismatch, and how to rename a file by case in git.
- The edge runtime does not support Node.js modules: fixing fs, net and dns errorsA route or middleware on the Edge runtime imports a Node only package and the Vercel build fails. What the Edge runtime supports, how to pick the right runtime, and which packages to swap.
- ERR_PNPM_OUTDATED_LOCKFILE on Vercel: regenerate the lockfile the right wayVercel refuses to install because pnpm-lock.yaml is not up to date with package.json. Why frozen installs fail, how to regenerate the lockfile with the right pnpm version, and what not to do.
- Prisma on Vercel: client not generated and query engine not foundThe two Prisma errors that only show up on Vercel. Why the generated client is missing, how postinstall fixes it, and what to do when the query engine binary is not found at runtime.