[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"problem-detail-error-warn-script-src-static-js-qrcode-js-in":3},{"stack":4,"error":5,"seoName":6,"seoStack":7,"seo":8,"breadcrumb":10,"titlePrefix":17,"titleAccent":18,"lead":19,"facts":22,"why":37,"log":47,"fix":72,"engine":85,"related":93,"pitch":100},"vite","warn-script-src-static-js-qrcode-js-in","Vite build fails because .env.production is missing","Vite",{"description":9},"Learn what causes Vite build fails because .env.production is missing, how PanelAlpha Engine responds to it during deployment.",[11,14,16],{"label":12,"href":13},"App Installations","\u002Fapps",{"label":7,"href":15},"\u002Fapps\u002Fstacks\u002Fvite",{"label":6},"Vite build fails because ",".env.production is missing",[20],{"text":21},"Error recorded 1 times in PanelAlpha Engine deploys on Vite. The deploy log below is the recorded failure output.",[23,28,31,33],{"label":24,"value":25,"tone":26,"tooltip":27},"Type","Error","err","An 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.",{"label":29,"value":30},"Seen","1 times",{"label":32,"value":7},"Where",{"label":34,"value":35,"tooltip":36},"Status","Observed","Our team will look into this soon, verify the cause and try to fix it in an upcoming release.",{"heading":38,"body":39},"Why it happens",[40,42,45],{"text":41},"The Vite build reaches the asset-copy step, but vite-plugin-static-copy is configured to copy ",{"text":43,"code":44},"\u002Fapp\u002F.env.production",true,{"text":46},". 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.",{"heading":48,"block":49},"What the log looks like",{"header":50,"lines":51},"Deploy log",[52,56,60,64,68],{"segments":53},[54],{"text":55},"[log] vite v8.1.5 building client environment for production...",{"segments":57},[58],{"text":59},"[warn] \u003Cscript src=\".\u002Fstatic\u002Fjs\u002Fqrcode.js\"> ... can't be bundled without type=\"module\" attribute",{"segments":61},[62],{"text":63},"[error] ✗ Build failed",{"segments":65},[66],{"text":67},"[plugin vite-plugin-static-copy:build]",{"segments":69},[70],{"text":71},"Error: No file was found to copy on \u002Fapp\u002F.env.production src.",{"heading":73,"steps":74,"block":82},"How to fix it",[75],[76,78,80],{"text":77},"Check the Vite configuration for the static-copy entry targeting ",{"text":79,"code":44},".env.production",{"text":81},". Either commit a non-secret production environment file if the app requires one, provide it through the configured deployment environment, or make the copy step conditional\u002Fremove it when the file is absent. Re-run the deployment after confirming the configured path matches the checkout\u002Fbuild path.",{"header":83,"lines":84},"Fix by hand",[],{"heading":86,"body":87,"block":90},"How PanelAlpha Engine solves it",[88],{"text":89},"Detect missing static-copy inputs before running the build and report the exact required file and configuration entry. The Vite strategy should distinguish non-fatal script warnings from the build-blocking missing-file error.",{"header":91,"lines":92},"",[],{"heading":94,"items":95},"Apps affected",[96],{"title":97,"badge":98,"tone":26,"href":99},"ladigitale\u002Fdigiview","1 occurrence","\u002Fapps\u002Fcodeberg.org\u002Fladigitale\u002Fdigiview",{"heading":101,"body":102,"footNote":103,"docsLabel":104,"docsHref":105},"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 CPU","Read the documentation","https:\u002F\u002Fpanelalpha.com\u002Fdocs"]