Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with bun #5675

Open
Lucienest opened this issue Sep 19, 2023 · 11 comments
Open

Doesn't work with bun #5675

Lucienest opened this issue Sep 19, 2023 · 11 comments

Comments

@Lucienest
Copy link

Pm2 doesn't work with bun
Please add support for it

@melroy89
Copy link

Yea that would be cool!

@Unitech
Copy link
Owner

Unitech commented Oct 6, 2023

How do you see the PM2 support with bun ?

@Unitech
Copy link
Owner

Unitech commented Oct 6, 2023

#5682

Unitech added a commit that referenced this issue Oct 6, 2023
@Lucienest
Copy link
Author

How do you see the PM2 support with bun ?

im not sure, the pm2 need fixes so it won't crash with bun

@melroy89
Copy link

melroy89 commented Oct 8, 2023

Or.. bun need fixes so Bun works with PM2 🤣 ...?

@TiBianMod
Copy link

the fork mode is working

will be really nice, if we can have support for cluster mode

CleanShot 2024-01-21 at 02 36 25

@melroy89
Copy link

I'm asking bun since day 1 bun was announced to implement cluster support. And they still are not focused on implementing nodejs cluster support. Which is a huge shame. Instead they are releasing thinks like "Bun Shell" and nobody was really asking for.🤔😭

@TiBianMod
Copy link

hehe

you can run cluster with bun on linux

this is not working on mac 😢

spawn.ts

import { join } from "node:path";
import { spawn } from "bun";

const threads = 10;

for (let i = 0; i < threads; i++) {
    spawn({
        cmd: ["bun", join(import.meta.dir, "server.ts")],
    });
}

NODE_ENV=production bun src/spawn.ts

@melroy89
Copy link

That is not backwards compatible with nodejs. Hence the request to have cluster support in bun. After all the goal of bun was to become a drop in replacement of nodejs after all. At least that is what they said themselves with v1.0.

@TiBianMod
Copy link

let's see, we need to wait, hehe

@ultimate-tester
Copy link
Contributor

ultimate-tester commented Feb 29, 2024

Hi guys, while you are waiting in this ticket, it seems that bun already made its way into the latest version of PM2:
135c123

This version was released as a MINOR version but the default interpreter has changed from ts-node to bun for typescript. WHY was this accepted? This is a huge change as you all know bun is not a direct drop-in replacement!

PLEASE revert that commit as soon as possible and go back to ts-node for typescript. Why on earth would an incompatible interpreter be chosen to be the default? It doesn't have have proper Windows support and is still missing nodejs implementations and documentation. Bun is nice, but NOT for production right this moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants