Use Case : You get the following error message : Command ‘bun’ not found after installing bun and you try to run a first command like bun -version .

Test platform : Windows 10, Windows Subsystem For Linux,Ubuntu 20.04 LTS

Solution : You need to add the bin executable of bun to the PATH, so you need to edit the file .bashrc under your HOME directory and add the two following lines :

export BUN_INSTALL= »/home/myusername/.bun »
export PATH= »$BUN_INSTALL/bin:$PATH »

where you replace the mysuername with your user.

Next step : Close your shell on WSL and open a new one.

Annexe

Full error message

Command ‘bun’ not found, did you mean:

command ‘ben’ from deb ben (0.9.0ubuntu2)
command ‘zun’ from deb python3-zunclient (4.0.0-0ubuntu1)
command ‘bus’ from deb atm-tools (1:2.5.1-4)

Message given by the bun installation

Manually add the directory to your $HOME/.bashrc (or similar)

export BUN_INSTALL= »/home/myusername/.bun »
export PATH= »$BUN_INSTALL/bin:$PATH »

Laisser un commentaire