pm2
pm2 copied to clipboard
[PM2][ERROR] Error: Interpreter bun is NOT AVAILABLE in PATH. (type 'which bun' to double check.)
What's going wrong?
Hello,
I got this error:
[PM2][ERROR] Error: Interpreter bun is NOT AVAILABLE in PATH. (type 'which bun' to double check.)
I use nodejs + express + typescript and run this code:
pm2 start src/server.ts --watch
I had the same issue when using a configuration file to specify the interpreter, but it went away when I either explicitly specified my root path (not just use "~"), or by passing it in the command:
pm2 start --interpreter ~/.bun/bin/bun src/main.ts
I had the same issue don't know why they switched to bun in 5.3.1
a patch update. Had to use specific to 5.3.0
version. Production was down for 3 hrs thanks to this.
Make no sense this migration. At least i think it's a major change.
bun is still experimental on windows at this time, but this works on a windows machine
pm2 start --interpreter C:\Users\your-name.bun\bin\bun.exe index.ts
This solved my case:
sudo npm install -g bun
This solved my case:
sudo npm install -g bun
yes that could work for some cases...
but in my case, with some require main
checks to differentiate code execution path between run-as-lib vs run-directly, bun isn't an option...
bun
isn't a drop-in-replacement as it proclaims...
And changing default behavior just for some benchmarks is just ridiculous
instead, pm2 should have printed a suggestion ("your nodejs app will run faster with --use-bun
option")
Or at least, pm2 should give an option to use the old default way of running *.ts
files
(eg. --use-old-tsnode
or --use-node-interpreter
)
This solved my case:
sudo npm install -g bun
Saved me a lot of time. Sad to see this hapening in this version, hope they come up with a fix for this soon.
This is so unbelievably ridiculous. I could recognize that it was using Bun under the hood because our app started crashing with dyld[89932]: missing symbol called
, which is happening exclusively in Bun. Why would such a major change be done in a patch update?
This solved my case:
sudo npm install -g bun
Yeah, this works for me as well.
no way of using ts-node ? my app is not compatible with bun
[EDIT] I could do the thing with this command
pm2 start --interpreter ts-node --name NAME index.ts
This solved my case:
pm2 start pm2.config.js --interpreter ~/.bun/bin/bun
This solved my case:
sudo npm install -g bun
Also working for me. Thanks a lot.
This solved my case:
sudo npm install -g bun
Also working for me. Thanks a lot.
bun is not compatible with a lot of projects and/or can fail silently.
I simply typed type which bun
in the terminal and used that path in place of ~/.bun/bin/bun