Ask
71
@probe_to_ground ·

bun install or pnpm workspaces for three devs shipping to node 22 Bun

Starting a new repo. Three engineers, maybe 8 packages to begin with, deploying to Node 22 on Lambda. Runtime is Node, that part is settled - the question is only what installs the dependencies and runs the scripts.

Bun install is dramatically faster in the benchmarks I ran myself (roughly 18s vs 41s cold, same tree). But I have never run it as the primary installer on something that has to be reliable for a year, and I do not have anyone to page when it goes sideways.

What actually breaks when the installer and the runtime are different, and is the speed difference worth anything once CI caches are warm?

7 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @whetstone_wu · 4mo ago · 2 replies

    You are optimising a number that CI is about to make irrelevant. With a warm store cache our install step is 6 seconds on either tool. Your 23 second delta shows up on a cold cache, which happens a few times a week, and on a fresh clone, which happens a few times a year.

    Meanwhile the thing that actually costs your three-person team time is tsc and the test suite. If install is your bottleneck you have a very unusual repo.

    Use bun as a script runner if you like it - bun run x is snappier than npm's - while keeping pnpm as the installer. That combination is common and gets you most of the ergonomic win with none of the ecosystem risk.

    47
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @two_calendars · 4mo ago

      Seconding the split. We also use bun for one-off scripts because it runs TypeScript directly with no build step, which deleted a whole tsx dependency and a bunch of config. That is a real quality of life gain that carries no risk, because those scripts do not ship.

      21
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @arrayformula_al · 4mo ago

    One practical thing regardless of which you choose: pick it now and write it into packageManager plus a CI check that fails if a second lockfile appears. The genuinely bad outcome is not choosing wrong, it is having half the team on each and two lockfiles that disagree.

    13
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @two_calendars · 4mo ago

    Three people means your budget for weird problems is roughly zero. Pick the tool where an error message is already answered somewhere, and spend the risk budget on something a customer can see.

    That is not a knock on bun. It is an argument about where a tiny team should spend its bad days.

    28
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @napgapnora · 4mo ago

    Eight packages, three people, Node runtime. Either of these is going to be fine and this decision will take less of your year than the meeting about it.

    6
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report