From e125a650fb8677ae89c64b2afb821d95d2f0a906 Mon Sep 17 00:00:00 2001 From: NB <208086304+chitcommit@users.noreply.github.com> Date: Sat, 19 Sep 2026 01:20:01 +0000 Subject: [PATCH 1/2] fix(deploy): stop the build command resolving to the home workspace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `wrangler deploy` fails before it uploads anything: No projects found in "/home/ubuntu" ERR_PNPM_RECURSIVE_EXEC_NO_PACKAGE No package found in this workspace `/home/ubuntu/pnpm-workspace.yaml` exists, so pnpm walks up past this repo, treats the home directory as the workspace root, finds no packages there and exits 1. Both `pnpm install` and `pnpm exec` hit it, and the build command runs with `cwd: ".."`, which does not escape the problem — the workspace file is above that too. `--ignore-workspace` fixes the install. It does NOT fix `pnpm exec`, which reads the flag as the name of the command to run: ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command "--ignore-workspace" not found Same for `--no-workspace-root-check`. Since the install now populates the repo's own node_modules, the binary is addressable directly, so this calls `./node_modules/.bin/vite` and drops `pnpm exec` entirely. Verified end to end in the repo root: install completes, `vite build` writes dist/public, "built in 7.01s". Both configs carry the same command and both were broken. deploy/system-wrangler.jsonc is the `--config` deploy path; wrangler.jsonc is the Workers Builds path. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01W2qFSSKdbsxo7AS8Buo247 --- deploy/system-wrangler.jsonc | 2 +- wrangler.jsonc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/system-wrangler.jsonc b/deploy/system-wrangler.jsonc index 0d17791..7a6d4e9 100644 --- a/deploy/system-wrangler.jsonc +++ b/deploy/system-wrangler.jsonc @@ -63,7 +63,7 @@ ], "build": { - "command": "pnpm install --frozen-lockfile && pnpm exec vite build --outDir dist/public", + "command": "pnpm install --frozen-lockfile --ignore-workspace && ./node_modules/.bin/vite build --outDir dist/public", "cwd": ".." }, diff --git a/wrangler.jsonc b/wrangler.jsonc index a742309..0bbe868 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -59,7 +59,7 @@ "observability": { "enabled": false }, "build": { - "command": "pnpm install --frozen-lockfile && pnpm exec vite build --outDir dist/public" + "command": "pnpm install --frozen-lockfile --ignore-workspace && ./node_modules/.bin/vite build --outDir dist/public" }, "assets": { From eda17276d3be0420b1a8bc72f5fddc5b60046163 Mon Sep 17 00:00:00 2001 From: NB <208086304+chitcommit@users.noreply.github.com> Date: Mon, 28 Sep 2026 23:14:20 +0000 Subject: [PATCH 2/2] fix(deploy): fail the build when it produces no client bundle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A separated adversarial review flagged that the previous revision could deploy successfully while serving an empty or stale dist/public: wrangler runs the build command, but nothing asserted the command actually produced a bundle. A silent empty build is worse than a failed one — the deploy reports success and the site breaks. `&& test -s dist/public/index.html` closes it. Verified both directions: exits 0 on a real build, non-zero when index.html is truncated to empty. The review's other blocking findings were checked against primary sources and did not hold: - `--ignore-workspace` does not change dependency resolution here. There is no pnpm-workspace.yaml in this repo, so the flag is a no-op wherever no workspace file sits above the checkout — which is every environment except the local one it was added to fix. - The relative binary path is correct in both configs. deploy/system-wrangler.jsonc sets `cwd: ".."` and wrangler.jsonc sets no cwd (so cwd is its own directory); both resolve to the repo root, where node_modules/.bin lives. - Exit codes do propagate through the `&&` chain — observed directly: the failing install aborted the deploy rather than continuing to upload. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01W2qFSSKdbsxo7AS8Buo247 --- deploy/system-wrangler.jsonc | 2 +- wrangler.jsonc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/system-wrangler.jsonc b/deploy/system-wrangler.jsonc index 7a6d4e9..9ccc1c1 100644 --- a/deploy/system-wrangler.jsonc +++ b/deploy/system-wrangler.jsonc @@ -63,7 +63,7 @@ ], "build": { - "command": "pnpm install --frozen-lockfile --ignore-workspace && ./node_modules/.bin/vite build --outDir dist/public", + "command": "pnpm install --frozen-lockfile --ignore-workspace && ./node_modules/.bin/vite build --outDir dist/public && test -s dist/public/index.html", "cwd": ".." }, diff --git a/wrangler.jsonc b/wrangler.jsonc index 0bbe868..10ac36d 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -59,7 +59,7 @@ "observability": { "enabled": false }, "build": { - "command": "pnpm install --frozen-lockfile --ignore-workspace && ./node_modules/.bin/vite build --outDir dist/public" + "command": "pnpm install --frozen-lockfile --ignore-workspace && ./node_modules/.bin/vite build --outDir dist/public && test -s dist/public/index.html" }, "assets": {