Compare with Node.js and Deno

Choose a runtime by engine, TypeScript support, package management, permission model, and deployment shape

Last updated on

Answer the selection question first

All three runtimes execute modern JavaScript. The differences that matter are compatibility boundaries, permission models, package ecosystems, and deployment shapes — not "who is faster." Microbenchmark rankings should never drive the decision; your dependency tree, deployment platform, and team experience should.

Capability matrix

DimensionBunNode.jsDeno
JS engineJavaScriptCoreV8V8
TypeScript executionNative, zero configExperimental since 22.6; erasable syntax runs by default since 23.6, enum etc. still need a transform flagNative, zero config
Type checkingNot included; keep tscNot included; keep tscBuilt-in deno check
Package managementbun install + text bun.locknpm + package-lock.json (or pnpm/Yarn)deno add + deno.lock; JSR registry and npm: specifiers
node_modulesRequiredRequiredNot by default (global cache)
Node API compatibilityImplements most node: APIs and Node-API; verify edgesNativeDeno 2 covers most node: / npm:; verify edges
Permission modelNo built-in sandboxExperimental permission model (--allow-fs-read, etc.)Sandboxed by default with explicit --allow-* / --deny-*
Testsbun test (Jest-style)node:testdeno test
Bundlingbun buildNot built in (esbuild/tsup, etc.)No general bundler (deno compile targets executables)
Single-file executablebun build --compileSEA (more steps)deno compile

Volatile rows: check primary sources

Node.js TypeScript support and permissions, and Deno's npm compatibility, are all moving fast. Reviewed on 2026-08-02; confirm against the Node.js docs and Deno docs before writing this into a decision record.

Decision paths

Your constraintLean toward
Greenfield CLI or internal service wanting one toolchain and native TSBun
Production system with heavy native addons requiring LTS and maximum compatibilityNode.js
Default-deny sandbox, URL imports, minimal edge scriptingDeno
Targeting Cloudflare Workers / Deno Deploy style edge platformsThe platform runtime decides, not local preference
Existing large repositoryValidate in parallel per Migrate from Node.js; don't switch on faith

Three common misjudgments

  1. "Bun is Node-compatible, so no testing needed": native addons, edge-case loaders, and diagnostic tooling can all behave differently — verify each.
  2. "Deno can't use npm packages": Deno 2's npm: support covers most common packages, but edges need testing just like Bun.
  3. "Node can't run TypeScript": current Node runs erasable type syntax directly; the real question — who runs type checks and production builds — is identical across all three runtimes.

Constraint wording for agents

Runtime: Bun 1.3.14. Do not suggest Deno permission flags or npm-only workflows.
If a dependency is documented Node-only or Deno-only, stop and report before migrating it.

Official references: Bun Node.js compatibility, Node.js TypeScript support, Deno runtime.