Bun released its version 1.0!
If you go to the release notes, the most exciting part of Bun is...
It is ( almost ) completely compatible with ( almost ) all the existing Node.js ecosystem.
Actually, they made it so compatible, some compatibility issues in Node.js doesn't even exist for Bun.
The most notable is module system,
require keywords can exist in harmony without ever writing
type: module to your package.json!
Edit: 12 September 2023
Well guys, that happened. Appearantly, I was tricked by the Bun commercial. Because, they advertised that Bun works with NestJS.
As I am excited about the Bun release, I jumped to the conclusions too quick. Appearantly, if you use
bun start it doesn't actually use Bun under the hood. Thankfully
@jmcdo29 mentioned this issue in the Discord group of NestJS.
If anyone can't load the image, here is the explanation:
By the way,
bun starton a
nest newproject calls
nest startwhich uses the
nestCLI which has a
nodeshebang, so it's using
node, not bun.
The explanation below is not applicable currently.
How to Run NestJS with Bun
Okay, but how do you run NestJS with Bun?
Well, it is a problem of the past.
If this doesn't work, install Bun first:
curl -fsSL https://bun.sh/install | bash
Don't you trust curl commands? Then you can use npm to install Bun:
npm install -g bun
NestJS or any other web framework popular enough is guaranteed to work with Bun.