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.
TypeErrorAn error that occurred in the deployed application. It is not necessarily a PanelAlpha Engine error, but we keep working on improvements so you run into fewer of them.
Seen1 times
WhereVite
StatusObservedOur team will look into this soon, verify the cause and try to fix it in an upcoming release.
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.