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

Nushell support for pnpm setup #6476

Open
luccahuguet opened this issue Apr 26, 2023 · 4 comments · May be fixed by pnpm/components#21
Open

Nushell support for pnpm setup #6476

luccahuguet opened this issue Apr 26, 2023 · 4 comments · May be fixed by pnpm/components#21

Comments

@luccahuguet
Copy link

luccahuguet commented Apr 26, 2023

Describe the user story

Could not use pnpm setup on nushell

Describe the solution you'd like

Please add support for nushell on pnpm setup

Describe the drawbacks of your solution

Describe alternatives you've considered

@ZerdoX-x
Copy link

ZerdoX-x commented Dec 6, 2023

Anyone got a workaround?

Tried $env.PNPM_HOME = "~/.local/share/pnpm/bin" + adding it to $env.PATH. Trying to globally install a package:

$ pnpm i --global turbo
ERROR  The configured global bin directory "~/.local/share/pnpm/bin" is not in PATH
For help, run: pnpm help add

UPD: Set global-bin-dir=/home/user/.local/share/pnpm/bin in my global npmrc. Not sure why, but it worked, even without $env.PNPM_HOME. We'll see how it goes. I am confused and not sure if it will break my npm global packages, because global npmrc is also being read by npm...

@tiptenbrink
Copy link

For people who didn't manage to run the install script when using Nu, do the following:

Open a bash shell and temporarily set the value of the SHELL environment variable to bash (so do something like export SHELL=bash). Then you can run the install script:

curl -fsSL https://get.pnpm.io/install.sh | bash -

Most likely, pnpm will be installed to your $HOME/.local/share/pnpm. So add the following to your env.nu (near the end) in ~/.config/nushell:

$env.PNPM_HOME = $"($env.HOME)/.local/share/pnpm"
$env.PATH = ($env.PATH | split row (char esep) | prepend $env.PNPM_HOME )

@luccahuguet
Copy link
Author

thanks @tiptenbrink

this works and is also according to nushell updated syntax as of now

@dougg0k
Copy link

dougg0k commented May 14, 2024

==> Downloading pnpm binaries 9.1.1
 WARN  using --force I sure hope you know what you are doing
Copying pnpm CLI from /tmp/tmp.uFgLWKFuBj/pnpm to /home/user/.local/share/pnpm/pnpm
 ERR_PNPM_UNSUPPORTED_SHELL  Can't setup configuration for "nu" shell

Supported shell languages are bash, zsh, fish, ksh, dash, and sh.
Install Error!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants