bun build should fallback to bun run build when no entrypoints are provided
What version of Bun is running?
1.3.3
What platform is your computer?
Darwin 25.1.0 arm64 arm
What steps can reproduce the bug?
- Add a
buildscript topackage.json:
"scripts": {
"start": "bun run index.ts",
"build": "bun build index.ts"
}
- Run
bun build(no arguments):
bun build v1.3.3 (274e01c7)
error: Missing entrypoints. What would you like to bundle?
Usage:
$ bun build <entrypoint> [...<entrypoints>] [...flags]
To see full documentation:
$ bun build --help
What is the expected behavior?
bun build is always treated as Bun’s built-in build subcommand. However, many projects define a build script, and when users run bun build with no arguments, it’s natural to expect it to behave like bun run build.
Expected: if bun build is invoked with no positional args/flags and a build script exists, Bun should fall back to running the project script (bun run build).
Actual: Bun still treats it as the internal build command.
What do you see instead?
bun build v1.3.3 (274e01c7)
error: Missing entrypoints. What would you like to bundle?
Usage:
$ bun build <entrypoint> [...<entrypoints>] [...flags]
To see full documentation:
$ bun build --help
Additional information
Of course, strictly speaking, this isn't a bug, but I think fixing this usage is more in line with Bun's all-in-one philosophy.
Found 1 possible duplicate issue:
- https://github.com/oven-sh/bun/issues/23093
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Duplicate of #23093.
This issue has been automatically closed as a duplicate.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code