Skip to content

fix(docs): restore nuxt peer so root cf deploy uses Wrangler - #7

Merged
0froq merged 1 commit into
mainfrom
cursor/fix-cf-deploy-nuxt-843d
Oct 15, 2026
Merged

0froq merged 1 commit into
mainfrom
cursor/fix-cf-deploy-nuxt-843d

Conversation

@0froq

@0froq 0froq commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Problem

Workers Build runs pnpm generate (passes) then pnpm exec cf deploy at the monorepo root. After PR #4, cf deploy tries pnpm nuxt build and fails:

ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command "nuxt" not found

nuxt is only installed for the docs workspace package, not on the root PATH. Single-package sites (void, paper-landing) keep nuxt in root dependencies, so this does not apply there.

Fix

Restore the pattern from #2: declare nuxt as a peerDependency of docs (not a root-resolvable dependency). Root cf deploy then delegates to Wrangler and bundles ./dist from wrangler.config.ts after Workers Build has already run pnpm generate.

Verification

Fresh clone at /opt/buildhome/repo, NODE_VERSION=22, Node ≥ 22.18 for cloudflare.config.ts:

pnpm install --frozen-lockfile && pnpm generate && pnpm exec cf deploy --dry-run
  • generate: 358 routes prerendered
  • cf deploy --dry-run: Delegating to Wrangler → Dry run complete (624 asset files from dist)
Open in Web Open in Cursor 

PR #4 moved nuxt back into docs dependencies. cf deploy at the monorepo
root then runs `pnpm nuxt build`, but nuxt is not on the root PATH.
Restore the peerDependency pattern from #2 so generate stays in docs and
cf bundles ./dist via Wrangler after Workers Build runs pnpm generate.

Co-authored-by: froQ <sayhola@froq.me>
@0froq
0froq marked this pull request as ready for review October 15, 2026 05:19
@0froq
0froq merged commit 9f6eda2 into main Oct 15, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants