Bun Interpreter Not Working on Latest PM2 Version
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
I have installed the following:
- NVM version 0.40.1
- Node version 23.10.0 installed at "/home/wesley/.nvm/versions/node/v23.10.0/bin/node"
- PM2 version 6.0.5 installed at "/home/wesley/.nvm/versions/node/v23.10.0/bin/pm2"
- Bun version 1.2.5 installed at "/home/wesley/.bun/bin/bun"
I am unable to run PM2 using Bun as the interpreter even when I specify the install location of Bun. PM2 shows it as running, but when I try to access the API application, it does not work. When I use Bun directly, it works. This problem has only occured since I upgraded to use the new version of PM2 (version 6.0.5). Examples below I have tried:
pm2 start ./index.ts --name "api" --interpreter bun- NOT WORKINGpm2 start ./index.ts --name "api" --interpreter /home/wesley/.bun/bin/bun- NOT WORKINGpm2 start ./index.ts --name "api" --interpreter=/home/wesley/.bun/bin/bun- NOT WORKING
The only command that does work is the following, however I don't know if this will prevent PM2's auto restarts for errors:
pm2 start "bun run ./index.ts" --name "api"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with NVM 0.40.1, Node 23.10.0, PM2 6.0.5, Bun 1.2.5, and the listed pm2 start commands for ./index.ts. Compare the Bun interpreter commands with pm2 start "bun run ./index.ts", including whether the API starts and restarts after errors; done means Bun works through PM2 with the expected auto-restart behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, javascript, nodejs, typescript
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100