Hello, my fellow readers!
When I first tried to set up bun I expected that Bun would work from any location on my disk. However, I encountered zsh: command not found
when I tried running bun command from my repository.
The next second, I googled this error and found what seems to be the most-viewed topic on the matter here stackoverflow.
People suggest fixing this issue by adding in .bashrc file such code
export BUN_INSTALL="/home/YOUR_USERNAME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
Unfortunately, this didn't work on my Mac and I realized that .bashrc is for Linux OS and working solution in my case is:
- Go to /Users/{your username}
- Create .zshrc file if it doesnโt already exist
- Add the following code to the
.zshrc
file
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
I hope this information is helpful to someone!
Top comments (0)