DEV Community

Cover image for Will Bun replace Node.js? First try with NestJS
Rodion
Rodion

Posted on

2

Will Bun replace Node.js? First try with NestJS

Many people recently talked about Bun, so we decided to try it.

Bun is a fast JavaScript all-in-one toolkit that helps to develop, test, run, and bundle JavaScript & TypeScript projects. It claims to be really fast in terms of runtime and development. So it should not only make the app faster but speed up the development process too. Take a look at their video presentation on YouTube.

Our idea was to run our Brocoders Nest.js Boilerplate on Bun and see how it performs. The test was made on MacBook Pro 2GHz, 16Gb memory:

Image description

So we tried to install dependencies with npm install and bun. The difference is pretty decent: 32s npm and 5s bun.

Image description

Image description

But then we tried to run it, there was an error appeared on the screen:

Image description

The problem is connected with emitDecoratorMetadata feature that is not supported by Bun yet. There is an issue with it on Github: https://github.com/nestjs/nest/issues/12359#issuecomment-1712712949
So, finally, I would say that Bun is really a perspective thing, but so far, it seems it's not ready for production yet. But we will definitely watch this repository and come back to it later.

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay