Common issues
Build output not generated
Symptom: No.next/output directory created after build.
Causes:
- Adapter not configured in
next.config.js - Build failed before adapter ran
- Wrong Next.js version (requires Next.js 15+)
Run
npm ls next to verify you’re using Next.js 15.0.0 or higher. The adapter requires the new adapter API introduced in Next.js 15.Functions fail to deploy
Symptom: Deployment succeeds but functions return errors at runtime. Common causes:Missing dependencies in filePathMap
Missing dependencies in filePathMap
The function bundle doesn’t include all required files.Verify all imports are included in the
filePathMap. Missing entries indicate a bug in asset resolution.Incorrect handler path
Incorrect handler path
The The adapter calculates this in
handler field in .vc-config.json points to the wrong file.outputs.ts:413-416 using path.posix.relative(repoRoot, projectDir).Wrong Node.js version
Wrong Node.js version
Function requires newer Node.js features than the runtime provides.Check Verify with:
.vc-config.json runtime field:Middleware not executing
Symptom: Middleware doesn’t run on expected routes. Debugging steps:-
Check middleware routes were generated:
-
Verify middleware function exists:
-
Check matcher configuration:
Prerender/ISR issues
Symptom: Dynamic routes show stale data or 404 errors. Check prerender config:fallback: false routes returning 404
fallback: false routes returning 404
When using This map is embedded in the handler (node-handler.ts:226-239) to check if routes exist.
fallback: false, non-prerendered paths must return 404.The adapter tracks these in prerenderFallbackFalseMap (index.ts:142-169):PPR fallback not working
PPR fallback not working
Partial Prerendering requires special content-type headers.Check the fallback file:The file should start with postponed state followed by HTML. The initial headers should include:Generated in
outputs.ts:561-565.i18n routing problems
Symptom: Wrong locale rendered or locale not detected. Debug locale routing:localeDetection: falsedisables automatic locale detection- Missing
NEXT_LOCALEcookie - Conflicting rewrite rules before locale handling
RSC/App Router issues
Symptom: App Router pages don’t load or show JSON instead of HTML. Check RSC routes:vary header:
shouldHandleSegmentPrefetches is true (index.ts:211-224).
Environment debugging
Handler environment
The Node.js handler receives configuration via string replacement (node-handler.ts:456-467):relativeDistDir.
Verify paths:
Edge runtime debugging
Edge functions use a different handler format:- Proper imports of all dependencies
- WASM assets referenced correctly
- Environment variables properly injected
Performance debugging
Build time issues
Symptom: Adapter takes a long time during build. The adapter uses concurrent operations with semaphores:Function size optimization
Symptom: Functions are too large, hitting deployment limits. The adapter includes several optimization techniques:Function deduplication via symlinks
Function deduplication via symlinks
Multiple ISR routes sharing the same source create symlinks instead of copies:Generated in
outputs.ts:517-535.Deterministic manifests
Deterministic manifests
The adapter strips non-deterministic fields from This allows infrastructure-level deduplication of identical functions.
routes-manifest.json:Shared asset references
Shared asset references
Known limitations
Workflow/step routes
Generated workflow and step routes have special handling:config.json files and may override adapter defaults.
Route manifest modifications
The adapter modifies routing behavior compared to standard Next.js:File system limitations
Debugging tools
Inspect configuration
Validate output structure
Enable verbose logging
The adapter doesn’t include built-in debug logging, but you can add it:Getting help
If you encounter issues not covered here:- Check the changelog: Review CHANGELOG.md for known issues and recent fixes
- Inspect the output: Use the debugging tools above to understand what was generated
- Compare with working config: Test with a minimal reproduction
- Report issues: Include the output structure and configuration when reporting bugs
When reporting issues, include:
- Next.js version (
npm ls next) - Adapter version (
npm ls @next-community/adapter-vercel) - Relevant
next.config.jssettings - Contents of
.next/output/config.json(sanitized) - Error messages and stack traces
Changelog highlights
Recent fixes from CHANGELOG.md:- 0.0.1-beta.12: Fixed lambda typing and payloads field
- 0.0.1-beta.10: Fixed initURL including empty query
- 0.0.1-beta.9: Made sure initURL is absolute
- 0.0.1-beta.8: Ensured initURL is initialized
- 0.0.1-beta.7: Applied generated step/workflow config overrides
- 0.0.1-beta.5: Stripped routes-manifest.json for determinism