On 2025-05-21, at 14:50, Daniel Saewitz <
swit...@gmail.com> wrote:
>
> I have a basic arrangement that I use when I startup iterm with a few panes of terminals.
>
> If I run `pnpm --version` in one of those panes I get:
>
> (master *)web ds$ which pnpm
> /Users/ds/.npm-global/bin/pnpm
> (master *)web ds$ pnpm --version
> 8.15.7
>
> But if I open a new terminal, I get the (expected) binary:
>
> ~ ds$ which pnpm
> /Users/ds/.npm-global/bin/pnpm
> ~ ds$ pnpm --version
> 10.10.0
>
> Same path.
>
> What's going on here? How can I ensure my arrangement has the proper context? Where is pn...@8.15.7 even existing? I can blow away my arrangement and start fresh, but would like to understand what's even happening here. Would appreciate any insight.
I'm assuming you're using `bash` or something similar as your shell.
* Try `which -a pnpm` to see if multiple `pnpm` executables are available in your PATH.
* Try `alias` to see if something is creating an alias called pnpm. If so, typing `pnpm` would run that alias instead of an executable from your PATH.
* Try `declare -F` to see if something is creating a function called pnpm. If so, typing `pnpm` would run that function instead of an executable from your PATH.
Another thing that comes to mind ... maybe something (maybe in your `.bash_profile` or `.bashrc` file) changes the files under `/Users/ds/.npm-global/`, that *hadn't* happened at the time you ran `pnpm --version` the first time, and it *had* happend by the time you ran it the second time. If you run the command again in the first terminal, does it still show 8.15.7 or does it *now* show 10.10.0? (Basically, is the change happening at a certain time, or is there a difference in the two shells?)
--
John Simpson - KG4ZOW
https://jms1.net/