卸载npm包后出错
我已使用以下命令卸载了npm软件包“grunt cli”和“tsd”:卸载npm包后出错,npm,npm-install,Npm,Npm Install,我已使用以下命令卸载了npm软件包“grunt cli”和“tsd”: sudo npm uninstall -g grunt-cli sudo npm uninstall -g tsd 但现在,当我列出所有npm包时: npm -g ls --depth=0 我得到这个错误。没有这样的文件或目录。这是正确的,因为我刚刚卸载了它们 /usr/local/lib ├── bower@1.7.1 ├── browserify@12.0.1 ├── express-generator@4.13.
sudo npm uninstall -g grunt-cli
sudo npm uninstall -g tsd
但现在,当我列出所有npm包时:
npm -g ls --depth=0
我得到这个错误。没有这样的文件或目录。这是正确的,因为我刚刚卸载了它们
/usr/local/lib
├── bower@1.7.1
├── browserify@12.0.1
├── express-generator@4.13.1
├── error: ENOENT: no such file or directory, open '/usr/local/lib/node_modules/grunt-cli/package.json
├── npm@3.5.3
├── error: ENOENT: no such file or directory, open '/usr/local/lib/node_modules/tsd/package.json
└── typescript@1.8.9
为什么会出现这个错误?如何完全删除grunt cli和tsd?Enoont是什么意思?(尝试用谷歌搜索…使用
哪个grunt cli
查找grunt cli文件夹,然后运行sudo rm grunt cli
对tsd执行同样的操作。尽管您运行了
npm uninstall
命令,但以下目录仍然意外地存在
/usr/local/lib/node\u模块/grunt cli
/usr/local/lib/node_模块/tsd
rm-r
命令手动删除它们:
$ rm -r /usr/local/lib/node_modules/tsd
$ rm -r /usr/local/lib/node_modules/grunt-cli
此外,还应检查命令别名是否仍然存在。命令名是
而且,只要检查并移除它们(如果存在)
$ which tsd <= check command path
/usr/local/bin/tsd <= if it exist
$ rm /usr/local/bin/tsd <= remove it
$ which grunt <= check command path
/usr/local/bin/grunt <= if it exist
$ rm /usr/local/bin/grunt <= remove it
$哪个tsd enoint表示E(错误)NO(否)entry(条目),或者换句话说,“找不到文件”。运行npm cache clean是否有帮助?有记录的问题: