cf build warns about workspace auto-configuration with an explicit Bun workspace Worker config
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- bun, typescript, vite
- 領域
- build-system, cli
調査の方向性
Start with the lockfile detection that emits the 'No lock file has been detected' message in the cf build code path, and check whether it only looks in the current working directory. Reproduce with the workspace layout from the issue (root bun.lock, worker in packages/worker, explicit cloudflare.config.ts and vite.config.ts) and run cf build --mode production. Done when the warning is suppressed for explicitly configured builds and still appears when the limitation really applies.
索引モデルが issue の本文から書いたものです。
説明
Summary of the issue
cf build prints an auto-configuration workspace limitation warning for an explicitly configured Worker inside a Bun workspace. The workspace has a valid root bun.lock, and the Worker declares cf, Vite and the Cloudflare Vite plugin in its own package manifest. The build itself succeeds.
The message says no lock file was detected in the current working directory, which is true for this layout, but it is unclear why auto-configuration limitations apply when cloudflare.config.ts and vite.config.ts are already provided.
Expected behaviour
Recognize the workspace root lockfile and distinguish an explicitly configured build from a build that relies on workspace auto-configuration. Keep the warning when the limitation actually applies.
Version of cf used
1.0.0-beta.26. Also reproduced with 1.0.0-beta.24.
System information and package versions
envinfo output, with local executable paths and the transient memory reading omitted:
System: macOS 27.2, Apple M3 arm64, zsh 5.9
Binaries: Node 26.13.0, npm 11.20.0, Bun 1.4.4, Yarn 4.18.1, pnpm 12.16.1, Deno 2.9.8
npmPackages: @cloudflare/vite-plugin 2.0.0-beta.v.5, cf 1.0.0-beta.26
Vite is 8.3.5.
Reproduction
Create a workspace root package.json:
{"name":"cf-bun-workspace-repro","private":true,"workspaces":["packages/*"]}
Create packages/worker/package.json:
{"name":"example-worker","private":true,"type":"module","devDependencies":{"@cloudflare/vite-plugin":"2.0.0-beta.v.5","cf":"1.0.0-beta.26","vite":"8.3.5"}}
Create packages/worker/cloudflare.config.ts:
import { defineConfig } from 'cf/config'
export default defineConfig({ worker: { name: 'example-worker', compatibilityDate: '2025-07-01', entrypoint: 'src/index.ts' } })
Create packages/worker/vite.config.ts:
import { cloudflare } from '@cloudflare/vite-plugin'
import { defineConfig } from 'vite'
export default defineConfig({ plugins: [cloudflare()] })
Create packages/worker/src/index.ts:
export default { fetch: () => new Response('ok') }
Run bun install at the root, then run ./node_modules/.bin/cf build --mode production from packages/worker. The root has bun.lock; the worker directory has no separate lockfile. node ./node_modules/vite/bin/vite.js build --mode production from the same worker directory succeeds without the warning.
Relevant error logs
No lock file has been detected in the current working directory. This might indicate that the project is part of a workspace. Auto-configuration of projects inside workspaces is limited. See https://developers.cloudflare.com/workers/framework-guides/automatic-configuration/#workspaces
Build complete
No deployment was performed.
- 主要言語
- TypeScript
- スター
- 960
- フォーク
- 62
- 平均マージ
- 19時間 7分
- マージ済み PR(30日)
- 193
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudflare/cf のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
cloudflare/cf#344 ·
メンテナーはふだん 1 日以内に返信
-
upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudflare/cf#262 ·
メンテナーはふだん 1 日以内に返信
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` template対応中かも @jamesopstad が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudflare/cf#223 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cloudflare/cf#179 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
cloudflare/cf#475 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
ci-cd desktop size:low telemetry-improvement telemetry-round-1
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
vfarcic/dot-agent-deck#2079 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
status:in-linear
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
🔊 a11y
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
betagouv/mon-entreprise#4726 ·
メンテナーはふだん 9 日以内に返信