From 1b6779a5218fa3edc80e1559f128a020d25ebec4 Mon Sep 17 00:00:00 2001 From: Vibhav Katre Date: Mon, 20 Jul 2026 15:06:59 +0530 Subject: [PATCH] Fix: build the SPA on install/deploy so /draw isn't "Page not found" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Vue SPA's two outputs — www/draw.html and public/frontend/ — are git-ignored build artifacts generated by `yarn build` (the frappe-ui vite plugin's buildConfig writes both). Nothing triggered that build on install, because the app had no root-level package.json. So a fresh `bench get-app draw` / Frappe Cloud deploy had NO www/draw.html at all, and visiting /draw returned Frappe's "Page not found" 404 (reported by @asoral). Fix: add a root package.json mirroring the pattern every Frappe SPA app uses (drive, helpdesk, gameplan, insights) — postinstall: cd frontend && yarn install # bench pulls frontend deps build: cd frontend && yarn build # bench build compiles the SPA `bench build` (run on every Frappe Cloud deploy and self-hosted install) now runs the app's build script, generating www/draw.html + assets. Verified: from a clean tree (both artifacts deleted) `bench build --app draw` regenerates the SPA and /draw serves again. Co-Authored-By: Claude Opus 4.8 (1M context) --- package.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..d467f1d --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "private": true, + "type": "module", + "scripts": { + "postinstall": "cd frontend && yarn install", + "dev": "cd frontend && yarn dev", + "build": "cd frontend && yarn build" + } +}