`cf deploy` / `cf build` need a package.json in the Worker directory that declares `@cloudflare/vite-plugin`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- bun, typescript, vite
- Domain
- cli, developer-experience
Research direction
Start by tracing implementation discovery used by cf build and cf deploy, especially the manifest check in the Worker's directory. Reproduce the Bun workspace case with the documented cf deploy --dry-run or cf build command, then verify that discovery reaches the workspace root or accepts an explicit root or manifest path. Done means both commands work without a Worker-local package.json.
Written by the indexing model from the issue text.
Description
Problem
In a Bun workspace, a Worker whose cloudflare.config.ts and vite.config.ts sit in a subdirectory with no package.json of its own cannot be built or deployed with a bare cf deploy / cf build. The Vite plugin is installed at the workspace root. cf looks for a manifest only in the Worker's own directory:
$ cd packages/api/src/register && cf deploy --dry-run --mode staging
…
The manifest checked was: …/packages/api/src/register/(package.json|pyproject.toml|Cargo.toml)
The workaround is vite build --mode <m> in that directory, then cf deploy --prebuilt --mode <m>, which works.
Expected
Implementation discovery resolves @cloudflare/vite-plugin the way Node resolution does, walking up to the workspace root, or accepts an explicit --root / manifest path.
Environment
[email protected], @cloudflare/[email protected], Bun workspaces, macOS.
- Dominant language
- TypeScript
- Stars
- 853
- Forks
- 42
- Avg merge
- 16h 43m
- Merged PRs (30d)
- 160
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/cf
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cloudflare/cf#344 ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cf#262 ·
Maintainers usually reply within 1 day
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templatePossibly taken @jamesopstad claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cf#223 · 2 assignees ·
Maintainers usually reply within 1 day
-
upstream
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cloudflare/cf#179 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
cloudflare/cf#347 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
diegosouzapw/OmniRoute#17386 ·
Maintainers usually reply within 1 day
-
ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
area/dashboard kind/bug kind/bug-qa QA/dev-automation
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vybestack/llxprt-code#3917 · 1 comment ·
Maintainers usually reply within 1 day
-
api-parity
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
IBM/carbon-components-ember#1157 ·
Maintainers usually reply within 1 day