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

I'd like to continue using the "global" bin directory from nvm with pnpm, but it seems like that isn't an option anymore. #4744

Closed
zkochan opened this issue May 16, 2022 · 0 comments · Fixed by #4751
Assignees
Milestone

Comments

@zkochan
Copy link
Member

zkochan commented May 16, 2022

I'd like to continue using the "global" bin directory from nvm with pnpm, but it seems like that isn't an option anymore.

nvm automatically updates the shell path depending on which version of node you're using, which means in order to make pnpm write files there I think I need to set this in my nvmrc:

global-bin-dir=/Users/me/.nvm/current/bin

This is a symlink to whatever version of node nvm has active currently.
However, that causes pnpm to fail with this message:

 ERROR  The configured global bin directory "/Users/me/.nvm/current/bin" is not in PATH

... which is sort of true, but the directory that resolves to is definitely in the PATH:

$ echo $PATH
...:/Users/me/.nvm/versions/node/v16.14.0/bin:....

$ ls -l ~/.nvm/current
... /Users/me/.nvm/current -> /Users/me/.nvm/versions/node/v16.14.0

So the result is that I can't install packages globally into different versions of node without making sure global-bin-dir is in sync before doing it (this includes pnpm itself)

Originally posted by @apottere in #4658 (comment)

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

Successfully merging a pull request may close this issue.

1 participant