Bun npm Compatibility: Which Packages Work, Which Don't, and Why
,## The Bun Promise vs. Reality,Bun promises to be a drop-in replacement for Node.js. The marketing is compelling: 25x faster package installation,TypeScript execution without transpilation,built-in SQLite support. But if you,re considering switching from Node + npm to Bun, you need to know the real story about npm compatibility.
Here"s what we found: ~87% of the top 1,000 npm packages work with Bun without modification, but the remaining 13% expose a painful truth—"drop-in replacement" doesn"t mean "zero configuration replacement."
Let"s break down which packages work, which don"t, and why.
Category 1: The Green Zone (Works Out of the Box)
~70% of packages live here, and they include most of what you use daily:
- React ecosystem: React, React Router, Next.js, Remix, Astro
- HTTP frameworks: Express, Fastify, Hono, Elysia
- Utilities: lodash, date-fns, zustand, axios, got
- Build tools: esbuild, tsup (when used as a library)
- TypeScript: tsc works; Bun runs
.tsfiles directly without transpilation
Why they work: These packages avoid Node.js-specific internals. They use standard JavaScript APIs, don"t rely on C++ native modules, and don"t depend on undocumented Node internals.
More from the blog
The Complete Node to Bun Migration Guide for 2026
Step-by-step guide to migrating your Node.js application to Bun — covering dependency compatibility, native addons, API differences, and CI/CD setup.
Bun vs Node.js Performance: Real-World Benchmarks That Actually Matter
Forget synthetic benchmarks. We tested Bun vs Node.js on real Express, Fastify, and Hono apps to show where Bun's speed advantage is real — and where it isn't.