Contribution
Describe the user story
We switched to useNodeVersion to manage our node version, but many developers still have npx $cmd deeply ingrained in their muscle memory. This will make those cmds use the node version on $PATH instead of the one installed by pnpm.
It's hard to retrain users thoroughly and mildly annoying to add our own workaround. So it'd be nice for pnpm to ensure all cmds always use the specified node version.
Describe the solution you'd like
Looking at the generated scripts from cmd-shim it seems the obvious choice would be to either add a node symlink in the node_modules directory or adjust the script to just always use pnpm's node.
Describe the drawbacks of your solution
There might be issues with backwards compatibility, which could be mitigate by making this strict behavior opt-in.
Describe alternatives you've considered
Other users encountered the same issue:
Contribution
Describe the user story
We switched to
useNodeVersionto manage our node version, but many developers still havenpx $cmddeeply ingrained in their muscle memory. This will make those cmds use the node version on $PATH instead of the one installed by pnpm.It's hard to retrain users thoroughly and mildly annoying to add our own workaround. So it'd be nice for pnpm to ensure all cmds always use the specified node version.
Describe the solution you'd like
Looking at the generated scripts from cmd-shim it seems the obvious choice would be to either add a
nodesymlink in the node_modules directory or adjust the script to just always use pnpm's node.Describe the drawbacks of your solution
There might be issues with backwards compatibility, which could be mitigate by making this strict behavior opt-in.
Describe alternatives you've considered
Other users encountered the same issue: