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
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):
Docs: agent-docs/runtime.md, docs/app/docs/runtime/page.ts, website/, packages/cli/templates/AGENTS.md, root AGENTS.md, READMEs. Drop the zero-install claims; state Bun installs like Node.
Versions: bump the touched published packages forward from their current npm versions (cli 0.10.27 up, server 0.8.38 up, core/mcp as needed) so release succeeds; per-package changelogs via the hook.
Landmines:action-seed-bun.js MUST keep the feat: make SSR action-result seeding work on Bun (#529) #534 seeding; only the pin is removed. Do NOT reset versions backward (npm publish fails on an existing version). The Node path was always install-based and must stay byte-identical.
Acceptance criteria
bun create webjs my-app runs bun install and produces node_modules (like Node); scaffold messaging no longer claims zero-install.
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 run devcan ENOENT on any package, including a latest one (reproduced live:@webjsdev/cli@0.10.27failed cold on a--saasscaffold, then worked once cached). Usually works, but not reliable for a first-time user's first boot.webjs db generate/migrateshell out to drizzle-kit (CJS), whichrequire()s drizzle-orm and resolves the wrong version (latest, not the app's pin), givingExport named 'defineRelations' not found. The pin shim cannot fix a CJS require.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):
packages/cli/lib/create.js): makebun createrunbun installlike Node (drop the skip-install default plus the "Skipped install / resolves on the fly" banner); remove thewebjs-bun.mjszero-install bootstrap generation (Zero-install dev/start on Bun via native auto-install (carve from #669) #675/feat: zero-install dev/start on Bun via auto-install bootstrap #676) and the zero-install comments; revisit the caret-range vs exact dep pinning notes (Revert scaffold @webjsdev/* + drizzle exact pins to semver ranges (after #698) #700/feat: scaffold @webjsdev/* and pg as caret ranges, keep drizzle exact #702) now that install resolves normally.packages/server/src/bun-pin-rewrite.js(feat: pin Bun zero-install deps via an onLoad specifier-rewrite from package.json #686/feat: forward inline-safe ranges in the bun zero-install pin rewrite #698/feat: share the server's resolved dep versions with the zero-install importmap #701) and the onLoad pin path inpackages/server/src/action-seed-bun.js(KEEP the SSR action-seeding part feat: make SSR action-result seeding work on Bun (#529) #534, surgical), thedev.jsintegration of the pin transform, and thevendor.jszero-install importmap version-sharing (feat: share the server's resolved dep versions with the zero-install importmap #701).packages/cli/lib/import-webjsdev.js(dogfood: bun zero-install bun run dev fails, cli can't resolve @webjsdev/server #709 pin of the cli's@webjsdev/*),packages/cli/lib/runtime-rewrite.js, and the bun zero-install branches inpackages/cli/bin/webjs.js.packages/mcp/src/mcp-source.jsbun-cache zero-install resolution (fix(mcp): source tool resolves @webjsdev from the Bun cache under zero-install #688).feat/bun-zeroinstall-tooling) and feat: transparent bun install for non-latest deps under zero-install #720 (feature/bun-transparent-auto-install); close them.agent-docs/runtime.md,docs/app/docs/runtime/page.ts,website/,packages/cli/templates/AGENTS.md, rootAGENTS.md, READMEs. Drop the zero-install claims; state Bun installs like Node.action-seed-bun.jsMUST keep the feat: make SSR action-result seeding work on Bun (#529) #534 seeding; only the pin is removed. Do NOT reset versions backward (npm publish fails on an existing version). The Node path was always install-based and must stay byte-identical.Acceptance criteria
bun create webjs my-apprunsbun installand producesnode_modules(like Node); scaffold messaging no longer claims zero-install.bun-pin-rewrite.jsdeleted;action-seed-bun.jskeeps seeding.bun run dev/startpluswebjs db generate/migrateall work (withnode_modules).