Skip to content

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

@zkochan

Description

@zkochan

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions