I have an NodeJS oclif CLI named "mydemo" and ran npm link
to register and execute the program's commands globally. After I ran npm unlink mydemo
to unregister the command, when I type the program's name, I get the error below.
$ mydemo
bash: /home/eric/.nvm/versions/node/v15.8.0/bin/mydemo: No such file or directory
$ mydemo
mydemo: command not found
How does Linux still know to look in the ".nvm" directory for this command if I've unlinked it?
npm unlink
npm uninstall -g mydemo
which mydemo
(no output)... it still searches that specific ".nvm" directory.
Nevermind. The command was cached in the shell session, possibly in the $PATH variable. It cleared in a new user session.