Skip to content

fix(api): run wrangler from repo root via --config flag#15

Merged
ofcskn merged 1 commit into
mainfrom
development
May 19, 2026
Merged

fix(api): run wrangler from repo root via --config flag#15
ofcskn merged 1 commit into
mainfrom
development

Conversation

@ofcskn

@ofcskn ofcskn commented May 19, 2026

Copy link
Copy Markdown
Owner

wrangler 4.x auto-detects the project type from cwd and errors when run from the monorepo root without a target. Fix:

  • wrangler.toml: main path changed from ../../dist/apps/api/worker.js to dist/apps/api/worker.js (relative to repo root)
  • deploy / deploy:preview / cf:dev targets: removed cwd override, pass --config apps/api/wrangler.toml so wrangler is always invoked from the workspace root where the dist/ output lives
  • README: update Cloudflare CI/CD deploy command examples to match

wrangler 4.x auto-detects the project type from cwd and errors when run
from the monorepo root without a target. Fix:
- wrangler.toml: main path changed from ../../dist/apps/api/worker.js
  to dist/apps/api/worker.js (relative to repo root)
- deploy / deploy:preview / cf:dev targets: removed cwd override,
  pass --config apps/api/wrangler.toml so wrangler is always invoked
  from the workspace root where the dist/ output lives
- README: update Cloudflare CI/CD deploy command examples to match

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ofcskn ofcskn merged commit dc0f278 into main May 19, 2026
1 check was pending
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.

1 participant