vercel-log-debug
Vercel log debugging
Turn raw Vercel runtime logs into a ranked report: biggest issues → root cause → fix.
Requires the Vercel CLI (vercel, or npx vercel / bunx vercel) and a logged-in account. Examples below use vercel.
Workflow
-
Verify link & scope. In the project dir run
vercel ls --prod 2>&1 | head. If it errors withCan't find ... under the context "<wrong-team>", the CLI is on the wrong scope: runvercel link(pick the right team/project) or pass--scope <team>on every command.vercel inspectin particular defaults to the personal scope and often needs--scope. -
Pull error logs — ALWAYS pass
--no-branch.vercel logssilently filters by the current git branch. On a feature branch that returns zero production logs (message:No logs found ... on branch <x>). This is the #1 trap. Fetch expanded JSON into a scratch dir:work=$(mktemp -d) vercel logs --environment production --no-branch --level error \ --since 24h --limit 1000 --expand --json 2>/dev/null > "$work/prod_errors.jsonl" wc -l "$work/prod_errors.jsonl"Retention is short (recent window only), so
--since 24hmay still return only the last few minutes. That's expected, not an error. If--limitis hit fast, one error is flooding.