Node.js has plans to support compiling applications to a single binary. Documentation here: https://nodejs.org/api/single-executable-applications.html
It's not yet stable, but this is pretty interesting and hopefully pretty useful.
If you've ever used Go[^1] you are familiar with the zen of single binary deployment. You compile your app once for a target architecture and your done![^2] Deployment is easy, startup is fast, Docker containers are small. Taken together this also means deployments are fast.
Can Node go in the same direction? Well, i'm skeptical. Node deployments are middling in terms of schlepp, in my opinion. Hopefully that improves though.
In the past I've tried various solutions to packaging node applications as a single binary. Quite literally not one single time has it worked without a hitch.
Bun, Deno, [pkg](https://github.com/vercel/pkg) have all tried to solve this problem in the past. `pkg` in particular was frustrating in how I never got it to just work. There was always some issue.
Deno never appealed as a packager because it lacked node compatibility (at the time. that may no longer be the case) and I haven't tried Bun as a packager in a while.
[^1]: Not only Go, but that's what I have real-world experience with in the compiled language space.
[^2]: Assuming no CGo (https://go.dev/blog/cgo). If CGo is involved, all bets are off.