Does not symlink a binary for pnpm
Using Volta through zsh on macOS Ventura 13.5.2, on an M1 Mac.
VOLTA_FEATURE_PNPM=1
volta install pnpm
# Or alternatively `node install -g pnpm`
Whether I used volta install pnpm or node install -g pnpm, each time, the command said that it successfully installed pnpm, but I found that although it did populate the following directories:
tools/inventory/pnpm
tools/image/pnpm
... it neglected to create a binary file inside ~/.volta/bin. Thus, when trying to use pnpm, I'd receive the message "zsh: command not found: pnpm".
As a workaround, I manually created the symlink:
cd /Users/jamie/.volta/bin
ln -sfn /Users/jamie/.volta/bin/volta-shim pnpm
This allowed me to use the pnpm command in my shell. After having used pnpm, I found that bin/inventory/pnpm had become populated for me, so I think the workaround succeeded.
Related:
- https://github.com/volta-cli/volta/issues/737
I think this is related to the known issue that Volta does not automatically create shim, similar to #1473. Native shim will be used for pnpm when VOLTA_FEATURE_PNPM is activated. To address this issue, perhaps volta-shim auto duplication could be added to Volta.