Purpose: Avoid repeat production build failures (Vercel, CI, local) when toolchain assumptions drift. Last updated: 2026-04-10Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Node.js version
package.jsonengines.nodeis set to>=22 <25so that:@julr/vite-plugin-validate-env(requires Node>=22) installs withoutEBADENGINEwarnings.- Local, GitHub Actions, and Vercel use a consistent baseline.
- Vercel: Node version is controlled via
package.jsonengines.node(highest priority; overrides Project Settings if valid) and via Project Settings → Build & Development → Node.js Version (fallback). Thebuild.env.NODE_VERSIONfield invercel.jsonis ineffective for runtime selection and should not be used. Set Project Settings → General → Node.js Version to 22.x to align withengines.node. If the dashboard is set to a different major version whileenginespins another, Vercel logs a warning and followsengines— keeping them aligned removes noise.
Vite 8 + Rolldown
- Do not use
vite-plugin-remove-consolewith the current Vite 8 + Rolldown pipeline. It has caused transform-time crashes (e.g.TypeError: ...find is not a function) on valid TSX. - Production console stripping is handled by
build.minify: 'esbuild'and rootesbuild.drop: ['console', 'debugger']whenmode === 'production'. This applies to client bundles only (not arbitrary Node scripts invite.config.tshooks). - Chunking uses
build.rolldownOptions.output.codeSplitting.groups, not Rollup’s deprecatedmanualChunks(Rolldown rejects unknownmanualChunks).
PWA / Workbox (vite-plugin-pwa)
workbox.globPatternsshould match emitted artifacts underdist/(e.g.assets/**/*.{js,css}, HTML, static extensions). Empty-glob warnings often mean the main app bundle failed to emit before the PWA step — fix the primary build error first.
Vercel MCP verification
After pushing to the connected Git branch, confirm the latest deployment and build logs:list_deployments→get_deployment/get_deployment_build_logsfor the failing or latestdpl_*.get_runtime_logsfor production/preview after a successful deploy (build failures produce no runtime logs).
Related
- CI_PIPELINE.md — local parity with GitHub Actions
- VERCEL_BUILD_IMPROVEMENT_PLAN.md — build workflow context
- PERFORMANCE_OPTIMIZATION_GUIDE.md — Rolldown chunk groups vs
manualChunks
Bun lockfile
If you use Bun, runbun install after package.json dependency changes so bun.lock stays in sync with npm removals (e.g. removed devDependencies).