简体   繁体   English

无法永远卸载nodejs

[英]Cant uninstall forever nodejs

I installed the package forever with 永远安装了包

npm install forever -g

When I tried to remove with 当我试图删除时

npm uninstall -g forever

It gives me the message up to date in 0.042s 它给我的消息up to date in 0.042s

But I can still use the forever command line. 但我仍然可以使用forever命令行。

Tried to restart the machine already, did not work so far. 试图重新启动机器,到目前为止没有工作。

I will appreciate any help with this. 我将不胜感激任何帮助。

Uninstalling an npm package 卸载npm包

The command is simple as below, 命令很简单,如下所示,

npm uninstall <name>

Note: If you're removing a global package, any applications referencing it will crash. 注意:如果要删除全局包,则引用它的任何应用程序都将崩溃。 Here are the options to uninstall, 以下是卸载选项,

npm uninstall <name> removes the module from node_modules, but not package.json
npm uninstall <name> --save removes it from dependencies in package.json
npm uninstall <name> --save-dev also removes it from devDependencies in package.json
npm -g uninstall <name> --save also removes it globally

Checking if it is still installed 检查是否仍然安装

Use the list command with the -g flag to see all packages that are installed globally: 使用带有-g标志的list命令可以查看全局安装的所有软件包:

npm list -g

To check if a specific package is installed globally, you can provide the name of package (grunt in this case) as seen below: 要检查是否全局安装了特定包,您可以提供包的名称(在本例中为grunt),如下所示:

npm list -g <name>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM