Vite build fails because .env.production is missing

Error recorded 1 times in PanelAlpha Engine deploys on Vite. The deploy log below is the recorded failure output.

Seen1 times
WhereVite

Why it happens

The Vite build reaches the asset-copy step, but vite-plugin-static-copy is configured to copy /app/.env.production. That file is not present in the build environment, so the build stops. The script-tag messages are warnings and are not the failure cause.

What the log looks like

Deploy log
[log] vite v8.1.5 building client environment for production...[warn] <script src="./static/js/qrcode.js"> ... can't be bundled without type="module" attribute[error] ✗ Build failed[plugin vite-plugin-static-copy:build]Error: No file was found to copy on /app/.env.production src.

Try PanelAlpha Engine yourself.

The easiest way to turn your server into a safe, controlled environment for your AI agent. Deploy, manage and maintain any project from Claude Code, Cursor, Codex or any other MCP client. Open source under Apache 2.0, free to run.

Requires Ubuntu 24.04 or 26.04 · 2 GB RAM · 1 CPURead the documentation