Issue Running Scripts via package.json in Fleet with Bun.js

Hi everyone,

I'm facing an issue when trying to run a script via package.json in my project on Fleet. My environment is as follows: Arch Linux, zsh, Fleet as the editor, and I'm using Bun.js to run the server.

Issue Description

When I try to start the dev or start script i have :

> bun run server.ts
sh: line 1: bun: command not found

fleet use this command 
/usr/bin/npm --prefix /home/dow/Documents/bookmakeIA/serveur run dev

Configuration Files

Here is my original package.json:

{
  "name": "ai-bookmark-server",
  "version": "1.0.0",
  "type": "module",
  "main": "server.ts",
  "scripts": {
    "start": "bun run server.ts",
    "dev": "bun run server.ts"
  },
  "devDependencies": {
    "@types/bun": "latest"
  },
  "peerDependencies": {
    "typescript": "^5.0.0"
  }
}


Temporary Solution

To work around this, I modified the package.json as follows:

"scripts": {
  "start": "npx bun run server.ts",
  "dev": "npx bun run server.ts"
},

With this modification, the commands now work as expected.
or the bun run start command in the terminal work.

Could I have missed any installation steps when setting up Bun on Arch Linux?
is there a way to change the fleet command from /usr/bin/npm --prefix to the bun binary?
Is there any specific configuration I need to add to my package.json file or my environment for bun to be recognized?

Merci d'avance pour votre aide !

1
1 comment

Hello, 

Thank you for the feedback!

I believe your case should be covered by the following feature request, please have a look: 

https://youtrack.jetbrains.com/issue/FL-30654/Bun-support-for-Fleet

1

Please sign in to leave a comment.