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
pnpm add -g
fails on no global bin dir since version 7.20.0
#5883
Comments
It seems this is actually occuring after 7.20.0, not 7.21.0, so may be related to this change; 7.19.0 works |
@FreekVR I tried 7.19.0 and i get the same error |
tried with 7.23.0 Still same error on macOS M1 |
bumping this |
+1 seeing the same issue with 7.26.0 on MacOS M1 |
+same ubuntu dev container |
same issue with 7.26.0 on MacOS M2 |
same |
1 similar comment
same |
actually can't update pnpm itself - |
This work for me in macOS Monterrey and mkdir -p ~/.pnpm/store
export PNPM_HOME=~/.pnpm/store
pnpm setup
source ~/.zshrc |
pnpm add -g
fails on no global bin dir since version 7.21.0pnpm add -g
fails on no global bin dir since version 7.19.0
@kenrick95 No, older v7 versions are fine. I've pinned the version of pnpm in our CI/CD to |
pnpm add -g
fails on no global bin dir since version 7.19.0pnpm add -g
fails on no global bin dir since version 7.20.0
@maxkobzev I was facing the same issue when trying to update from 7.16 to 7.29 and the issue was because I had node servers running...maybe that can help you. |
@vickvasquez the pnpm home directory is not the store. It is confusing to name it the store. The pnpm store is located at these locations: https://pnpm.io/npmrc#store-dir Also, this issue might be fixed as we shipped some fixes to the |
@zkochan When running pnpm in a CI pipeline, what should we do to ensure there is no "ERR_PNPM_NO_GLOBAL_BIN_DIR" error when executing the |
could you just use |
Yes it does the job for my use case thanks 👍. Yet I can see some use cases where I would need to execute several commands from a CLI and |
Yeah, |
I'm trying to use - name: Install Nx 😢
env:
SHELL: /bin/bash
run: |
pnpm setup
source /home/runner/.bashrc
pnpm add nx -g Nx is already an inefficient runner (and I presently don't have a choice about using it on a project) and we're trying to avoid running it through another node process, running it directly which requires installing it globally. |
I just added |
The solution here worked for me in the context of Alpine Linux in Docker: #784 (comment) |
I'am on Fedora 38
if I make: then
work fine (no error) I have try to follow nvm pnpm executable on but after a while my eyes crossed.
show the same version ... My question is: best regards, |
I've been having this problem when trying to install global packages during postStartCommand in a devcontainer. no matter what I do, sourcing the .bashrc file makes no difference. I've tried writing this out directly in the script as well as in its own file howver it doesn't work ERR_PNPM_NO_GLOBAL_BIN_DIR Unable to find the global bin directory
pnpm version 8.14.3 |
Run these 2 simple commands
it should now work! |
pnpm version:
7.21.0, 7.22.0
Code to reproduce the issue:
(In isolated/docker environment)
Docker image:
Run this code within a container using this image:
Expected behavior:
Given that global-bin-dir option is set as per the instruction, it should not error.
Actual behavior:
Returns an error, while it worked fine with the same code before this change was introduced; #5841.
Additional information:
node -v
prints:The text was updated successfully, but these errors were encountered: