node.js Apache Cordova - 全局卸载

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19523539/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-02 16:03:27  来源:igfitidea点击:

Apache Cordova - uninstall globally

node.jscordovauninstall

提问by itsme

I've installed cordova via npm and i did it globally, now i would like to remove it to reinstall it on single app folder

我已经通过 npm 安装了cordova 并且我是全局安装的,现在我想删除它以在单个应用程序文件夹中重新安装它

Any clue on how to do it safely?

关于如何安全地做到这一点的任何线索?

回答by enducat

Try sudo npm uninstall cordova -gto uninstall it globally and then just npm install cordovawithout the -g flag after cding to the local app directory

尝试sudo npm uninstall cordova -g全局卸载它,然后npm install cordovacd进入本地应用程序目录后不使用 -g 标志

回答by KAUSHAL J. SATHWARA

Try this for Windows:

在 Windows 上试试这个:

    npm uninstall -g cordova

Try this for MAC:

在 MAC 上试试这个:

    sudo npm uninstall -g cordova

You can also add Cordova like this:

您还可以像这样添加 Cordova:

  1. If You Want To install the previous version of Cordova through the Node Package Manager (npm):

    npm install -g [email protected]
    
  2. If You Want To install the latest version of Cordova:

    npm install -g cordova 
    
  1. 如果您想通过节点包管理器 (npm) 安装先前版本的 Cordova:

    npm install -g [email protected]
    
  2. 如果您想安装最新版本的 Cordova:

    npm install -g cordova 
    

Enjoy!

享受!

回答by garrettmac

Super late here and I still couldn't uninstall using sudoas the other answers suggest. What did it for me was checking where cordovawas installed by running

在这里太晚了,我仍然无法sudo按照其他答案的建议卸载。对我来说是cordova通过运行检查安装的位置

which cordova

it will output something like this

它会输出这样的东西

/usr/local/bin/

then removing by

然后删除

rm -rf /usr/local/bin/cordova