GUIDES
Why it works locally
and fails on Vercel.
One page per failure class, with the fix. Every guide ends with a scan, and your first one each day is free for public repositories. Looking for a specific error message? See the Vercel error reference.
- 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: missing packages and 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.
- Vercel 404 NOT_FOUND after deploy: framework, output and routingThe build is green, the deployment says Ready, and every URL returns 404 NOT_FOUND with nothing in the logs. The usual cause is a project setting, not your code. How to find it and stop it from coming back.
- Supabase 42501 permission denied for table: the missing GRANT on new tablesA new table returns 42501 permission denied through the Supabase Data API even though RLS policies look right. Supabase is removing the automatic grants on new tables in public. What changed, how to fix it with the right GRANT, and how to catch it in your migrations.
- Hobby accounts are limited to daily cron jobs: fixing the Vercel deploy errorThe deployment fails because a cron job in vercel.json would run more than once per day. What the Hobby plan allows, how to read a cron expression to see how often it runs, and the two ways to fix it.
- Next.js 16 build fails with a webpack config: Turbopack is now the defaultAfter the upgrade to Next.js 16, next build stops because next.config has a webpack function. Why Next.js fails on purpose, the three ways out, and what to do when a plugin added the webpack config.
- Astro on Vercel: Cannot use server-rendered pages without an adapterastro build stops with NoAdapterInstalled when a page renders on demand and no adapter is set. When an Astro site needs an adapter on Vercel, how to add @astrojs/vercel, and when a static site needs none.
- Vite SPA on Vercel: fix 404 when refreshing a nested routeYour Vite homepage loads, but /dashboard or /settings returns 404 on refresh. Fix the SPA history fallback without hiding missing static assets.
- Deploy SvelteKit to Vercel: choose the right adapterSvelteKit deploys with the wrong adapter or fails to create server routes. Learn how adapter-auto differs from adapter-vercel and what to check in the output.
- Next.js next/image unconfigured host: fix remotePatterns on VercelFix the next/image hostname is not configured error. Match protocol, hostname, pathname and query-string rules in Next.js remotePatterns.
- pnpm 10 ignored build scripts on Vercel: fix missing native binariespnpm 10 skips some dependency install scripts. Diagnose ignored builds that break esbuild, sharp, native packages or generated binaries during a Vercel deployment.
- Next.js output export fails: dynamic routes, cookies and API handlersUsing output: export on Vercel? Learn why request-time routes, cookies, server handlers and default image optimization fail in a static export.
- FUNCTION_INVOCATION_FAILED on Vercel: debug the runtime crashVercel build is Ready but a serverless endpoint returns 500 FUNCTION_INVOCATION_FAILED. Find the real error in runtime logs and isolate the failing request.
- Vercel monorepo build fails: set Root Directory and workspace installsFix Vercel builds that run from the wrong monorepo folder, cannot find package.json, or fail to resolve workspace dependencies in apps/web.
- Supabase new row violates row-level security policy: fix INSERT checksFix Supabase inserts rejected by RLS without disabling security. Understand auth.uid(), WITH CHECK, grants and the difference from permission denied for table.
- Invalid vercel.json on Vercel: diagnose schema and routing errorsA malformed or unsupported vercel.json can block deployment. Validate configuration keys, rewrites, cron schedules and framework settings before pushing.
- Wrong Node.js version on Vercel: fix engines and build mismatchesYour app needs another Node.js major version. Check Vercel Project Settings, package.json engines and the runtime reported by deployment logs.