[英]Where is `npm link` registring commands on Ubuntu?
I have an NodeJS oclif CLI named "mydemo" and ran npm link
to register and execute the program's commands globally.我有一个名为“mydemo”的 NodeJS oclif CLI,并运行
npm link
以全局注册和执行程序的命令。 After I ran npm unlink mydemo
to unregister the command, when I type the program's name, I get the error below.在我运行
npm unlink mydemo
以取消注册命令后,当我输入程序名称时,我收到以下错误。
$ 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?如果我已取消链接,Linux 如何仍然知道在“.nvm”目录中查找此命令?
npm unlink
npm unlink
npm uninstall -g mydemo
npm uninstall -g mydemo
which mydemo
(no output) which mydemo
(无输出) ... it still searches that specific ".nvm" directory. ...它仍然搜索特定的“.nvm”目录。
Nevermind.没关系。 The command was cached in the shell session, possibly in the $PATH variable.
该命令缓存在 shell session 中,可能在 $PATH 变量中。 It cleared in a new user session.
它在新用户 session 中清除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.