You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
workspace: include globs match directories without package.json, and the resulting "Cannot find entry" error names the root config instead of the offending directory #1067
pkgs/real/src/index.ts exists and matches the entry glob, but the build never reaches it: the package-less pkgs/ghost also gets built — it has no config of its own, so it inherits the root entry via mergeConfig(normalized, config) — and entry resolution matches nothing inside that directory.
In src/config/workspace.ts, include: 'auto' globs **/package.json so it only ever finds real packages, but a user-provided include array globs directories (onlyDirectories: true) with no package-ness check. The error's nameLabel (src/features/entry.ts) then carries the merged config's inherited root name.
Any additional comments?
Verified with tsdown 0.23.0 and 0.22.2, Node v24.16.0, Windows 10.
We hit this in the deepseek-harness monorepo (~270 packages), whose root tsdown config drives workspace builds this way (workspace: ['vendor/*', 'packages/*/*', 'apps/cli']). One stale directory left behind after a package rename — Windows file locks commonly prevent git from fully removing directories — broke pnpm run build for the whole monorepo with an error pointing at the root package. Locating the actual culprit took a long time precisely because the message carries no path.
Suggested fix (either or both):
After globbing user-provided include patterns, drop directories containing neither package.json nor a tsdown config file (maybe log at debug level).
Include the resolved cwd in the Cannot find entry error so the offending directory is identifiable.
Activity
fix(build): tsdown workspace 排除没有 package.json 的目录
docs(toolchain): 审计清单新增 N33(tsdown workspace 误收无清单目录)