pnpm: v5.2.4 Regression: Couldn't find a suitable global executables directory.

pnpm version:

v5.2.4

Code to reproduce the issue:

Have pnpm bins installed in D:\Programs\NodeJS\pnpm‑global\

Expected behavior:

pnpm --global commands work correctly.

Actual behavior:

 ERROR  Couldn't find a suitable global executables directory.

Caused by https://github.com/pnpm/pnpm/pull/2637, D:\Programs\NodeJS\pnpm‑global\ doesn’t get treated as a valid global bin directory.

Additional information:

  • node -v prints: v14.4.0
  • Windows, OS X, or Linux?: Windows

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 50 (36 by maintainers)

Commits related to this issue

Most upvoted comments

no, actually the only way at the moment is to use the --dir CLI option.

For instance: pnpm install --global --dir=/home/foo

Related code:

https://github.com/pnpm/pnpm/blob/main/packages/config/src/index.ts#L249-L255

Is there any reason as to why pnpm doesn’t use the prefix option anymore? or am I missing out on something? 😅

This issue is so fundamentally breaking it should have been caught by a CI service and never make it into a release in the first place. It looks like you are using GitHub actions, but only for Windows? Why not add macOS and Linux test runners?