Why I Switched Back to Node.js from Bun

2025-05-27 · Ryan X. Charles

TL;DR: I switched back from Bun to Node.js because Bun ran out of memory in production on the first day for a simple landing page, indicating it is not sufficiently mature for production use. It had other issues too. Node.js may have some undesirable legacy attributes, but it is very mature and stable, making it a better choice for production applications.


I tried using Bun for the new version of Artintellica because Bun offers several theoretical advantages over Node.js, including:

  • Integrated TypeScript support
  • Integrated testing framework
  • Integrated bundler
  • Fast and integrated HTTP server
  • Fast startup time

However, during development, I discovered that Bun doesn’t work out of the box with React Router 7 because it lacks the “PipeableStream” feature that React Router 7 requires. This forced me to create a hacky workaround to make it function in both development and production environments. This was not an ideal start, but I was willing to tolerate it.

Unfortunately, overnight, I encountered a more serious issue: my server ran out of memory and crashed. This has never happened to me with Node.js and should not occur for a simple landing page with no users. This issue signaled that Bun is not yet mature enough for production use.

Although Bun may have theoretical advantages over Node.js, there are robust solutions for all the problems Bun aims to address within the Node.js ecosystem, including:

  • Use tsx to run TypeScript files
  • Once TypeScript is configured in one project, you can copy the configuration to other projects, making setup straightforward
  • Use Vitest for testing, which is fast and works well with TypeScript
  • Use Vite for bundling, which is fast and compatible with React Router 7
  • Use Express for the HTTP server, which may not be as fast as Bun’s HTTP server but is very mature, stable, and widely supported in the Node.js ecosystem

I’m glad Bun exists, and I’m optimistic that it will eventually mature into a viable alternative to Node.js. However, for now, I am switching back to Node.js for Artintellica and all my other projects.


Earlier Blog Posts

Why I Switched Back to Zsh from Nushell
2025-05-26 · Ryan X. Charles
Why I Moved Back to California from Texas
2025-05-21 · Ryan X. Charles
My Tech Stack in 2025
2025-05-03 · Ryan X. Charles
Bitcoin is Dead in 2025
2025-04-08 · Ryan X. Charles

Back to Blog

Copyright © 2025 Ryan X. Charles
Home · CV · About · Blog