Debug Vercel deployment issues for the CoinSite Astro project.
This skill provides a systematic workflow for debugging Vercel deployment issues specific to the CoinSite project (Astro 5 with SSR, @astrojs/vercel adapter, Astro DB with Turso).
GitHub auto-deploys to Vercel on every git push. Each push = one deployment.
# WRONG - Creates duplicate deployments
vercel deploy --prod
vercel --prod
The bd git hooks automatically flush beads changes to JSONL on git commit, so you don't need separate bd sync calls.
Optimized single-deployment workflow:
# 1. Work on the issue (claim, code, close)
bd update <id> --status=in_progress
# ... make code changes ...
bd close <id>
# 2. Stage EVERYTHING (code + beads) in one commit
git add -A
git commit -m "Your message"
# 3. ONE push = ONE deployment
git push
Why this works:
bd update and bd close modify the local database.beads/issues.jsonlgit add -A stages both code AND beads changesgit push triggers exactly one Vercel deploymentAvoid these patterns (cause multiple deployments):
# BAD: Calling bd sync separately pushes to git
bd sync # <-- This pushes, triggering a deployment!
git push # <-- This ALSO pushes, another deployment!
# BAD: Multiple commits with pushes between
git commit && git push # deployment 1
bd sync # deployment 2
git status # Check what changed
bd close <ids> # Close completed issues
git add -A # Stage everything
git commit -m "..." # Commit (hooks flush beads)
git push # ONE deployment
Run the comprehensive health check script to automatically:
npx tsx .claude/skills/vercel-deploy-debug/scripts/deployment-health-check.ts
Optionally pass a specific deployment URL:
npx tsx .claude/skills/vercel-deploy-debug/scripts/deployment-health-check.ts https://coinsite-xxx.vercel.app
List recent deployments to see current state:
vercel ls
This shows deployment URLs, status (Ready, Error, Building), and timestamps.
Get detailed info about a deployment:
vercel inspect <deployment-url>
Shows build output, function regions, and configuration details.
Check logs for a specific deployment:
vercel logs <deployment-url>
Add --follow to stream logs in real-time during builds.
Verify environment variables are set correctly:
vercel env ls
For Astro DB with Turso, ensure these are set in Vercel:
ASTRO_DB_REMOTE_URL - Turso database URLASTRO_DB_APP_TOKEN - Turso auth tokenSymptom: Build fails with "NoAdapterInstalled" or adapter not found.
Causes:
astro.config.mjs is gitignored and not deployedDiagnostic:
# Check if astro.config.mjs is tracked
git ls-files astro.config.mjs
# Check .gitignore for problematic patterns
grep -E "^\*\.mjs|astro" .gitignore
Fix:
astro.config.mjs is NOT in .gitignoreimport vercel from '@astrojs/vercel/serverless'import vercel from '@astrojs/vercel'Symptom: Runtime 500 errors with "Could not locate libsql native module".
Cause: Deploying prebuilt output from macOS to Vercel's Linux environment.
Fix: Always use Vercel's remote build (default). Do NOT use:
# WRONG - builds locally then deploys
vercel build --prod && vercel deploy --prebuilt
Instead push to GitHub and let Vercel build remotely.
Symptom: Vercel uses old prebuilt output instead of building fresh.
Diagnostic:
vercel inspect <url>
# Look for "Using prebuilt output" in logs
Fix:
.vercel/output directory locallyVERCEL_FORCE_NO_BUILD_CACHE=1Symptom: Some browsers show certificate errors or different issuer.
Diagnostic:
# Check certificate chain
curl -v https://your-domain.vercel.app 2>&1 | grep -A 5 "SSL certificate"
# Detailed SSL check
openssl s_client -connect your-domain.vercel.app:443 -servername your-domain.vercel.app </dev/null 2>/dev/null | openssl x509 -noout -issuer -subject
Note: Vercel uses Let's Encrypt certificates. If you see a different issuer (e.g., NordVPN), it's client-side TLS interception by VPN/security software, not a server issue.
output: 'server')@astrojs/vercel v8.2.7 (use /serverless import)--remote flag for builds)astro build --remoteimport db from '@astrojs/db';
import vercel from '@astrojs/vercel/serverless'; // v8.x path
import { defineConfig } from 'astro/config';
export default defineConfig({
output: 'server',
adapter: vercel(),
integrations: [db()],
});
| Command | Purpose |
|---|---|
npx tsx ...health-check.ts |
Run automated health check |
vercel ls |
List deployments |
vercel inspect <url> |
Deployment details |
vercel logs <url> |
View logs |
vercel env ls |
List env vars |
vercel env pull |
Pull env vars to local .env |
git push |
Deploy to production (auto-triggers Vercel) |
scripts/deployment-health-check.ts - Automated health check scriptreferences/common-errors.md - Detailed error messages and stack traces