Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bun install --global is broken #2626

Closed
paperdave opened this issue Apr 11, 2023 · 4 comments
Closed

bun install --global is broken #2626

paperdave opened this issue Apr 11, 2023 · 4 comments
Labels
bug Something isn't working npm Something that relates to the npm-compatible client

Comments

@paperdave
Copy link
Collaborator

What version of Bun is running?

0.5.9 and 0.6 canary

What platform is your computer?

No response

What steps can reproduce the bug?

bun i -g esbuild
bun i --global esbuild

image

its installed at ~/.bun/install/global/node_modules/esbuild/bin/esbuild but the bin file is not added to .bun/bin

$BUN_INSTALL is set to /home/dave/.bun as it should be

What is the expected behavior?

to install

What do you see instead?

No response

Additional information

No response

@paperdave paperdave added the bug Something isn't working label Apr 11, 2023
@Electroid Electroid added the npm Something that relates to the npm-compatible client label Apr 11, 2023
@colinhacks
Copy link
Contributor

Hm, working for me on mac/zsh

@paperdave
Copy link
Collaborator Author

okay weird it works for me now. must've been some weird PATH config or whatever

@isaced
Copy link

isaced commented Nov 1, 2023

This works for me.

export BUN_INSTALL="/home/YOUR_USERNAME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"

@yemreak
Copy link

yemreak commented Nov 4, 2023

Generalized version of @isaced's solution

  • touch ~/.zprofile if not exists
  • Append the below to ~/.zprofile with open ~/.zprofile command
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working npm Something that relates to the npm-compatible client
Projects
None yet
Development

No branches or pull requests

5 participants