Skip to content

refactor: remove Bun zero-install; Bun installs normally like Node #721

Description

@vivek7405

Problem

Bun zero-install (resolve deps on the fly, no node_modules) is not a reliable foundation and is being removed. Investigation this session established:

  • bun cold auto-install is intermittently flaky. A first cold bun run dev can ENOENT on any package, including a latest one (reproduced live: @webjsdev/cli@0.10.27 failed cold on a --saas scaffold, then worked once cached). Usually works, but not reliable for a first-time user's first boot.
  • The DB tooling fails cold regardless. webjs db generate/migrate shell out to drizzle-kit (CJS), which require()s drizzle-orm and resolves the wrong version (latest, not the app's pin), giving Export named 'defineRelations' not found. The pin shim cannot fix a CJS require.
  • The "no install, instant dev" pitch is therefore only half-delivered on bun, while Node already installs normally and works reliably.

Decision: drop Bun zero-install. Bun apps install normally (bun install), exactly like Node. Bun stays a first-class runtime; it just stops doing the on-the-fly trick. True zero-install (including editor types) is pursued separately on Deno, where it works natively (#669), and is out of scope here.

Design / approach

A forward removal PR off current main (NOT a git reset to before #676, which would lose interleaved unrelated work like #681/#678 and desync repo versions from the already-published npm releases). Keep monotonic versions and all unrelated work; just delete the zero-install code and restore install-based behavior.

Implementation notes (for the implementing agent)

Remove or restore (surgical, since some files mix concerns):

Acceptance criteria

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions