Home > Web Front-end > JS Tutorial > zsh: command not found: bun

zsh: command not found: bun

Mary-Kate Olsen
Release: 2025-01-05 21:16:43
Original
578 people have browsed it

zsh: command not found: bun

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"
Copy after login

Unfortunately, this didn't work on my Mac and I realized that .bashrc is for Linux OS and working solution in my case is:

  1. Go to /Users/{your username}
  2. Create .zshrc file if it doesn’t already exist
  3. Add the following code to the .zshrc file
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
Copy after login

I hope this information is helpful to someone!

The above is the detailed content of zsh: command not found: bun. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template