卸载npm和安装npm_使用`npm uninstall`卸载npm软件包「建议收藏」

卸载npm和安装npmTouninstallapackageyouhavepreviouslyinstalledlocally(usingnpminstall<package-name>inthenode_modulesfolder,run要卸载以前在本地npminstall<package-name>(使用node_modul…

大家好,又见面了,我是你们的朋友全栈君。

卸载npm和安装npm

To uninstall a package you have previously installed locally (using npm install <package-name> in the node_modules folder, run

要卸载以前在本地 npm install <package-name> (使用node_modules文件夹中的npm install <package-name> ,请运行

npm uninstall <package-name>

from the project root folder (the folder that contains the node_modules folder).

从项目根文件夹(包含node_modules文件夹的文件夹)中。

Using the -S flag, or --save, this operation will also remove the reference in the package.json file.

使用-S标志或--save ,此操作还将删除package.json文件中的引用。

If the package was a development dependency, listed in the devDependencies of the package.json file, you must use the -D / --save-dev flag to remove it from the file:

如果程序包是在package.json文件的devDependencies中列出的开发依赖关系,则必须使用-D / --save-dev标志将其从文件中删除:

npm uninstall -S <package-name>
npm uninstall -D <package-name>

If the package is installed globally, you need to add the -g / --global flag:

如果软件包是全局安装的,则需要添加-g / --global标志:

npm uninstall -g <package-name>

for example:

例如:

npm uninstall -g webpack

and you can run this command from anywhere you want on your system because the folder where you currently are does not matter.

并且您可以在系统上的任何位置运行此命令,因为当前所在的文件夹无关紧要。

翻译自: https://flaviocopes.com/npm-uninstall-packages/

卸载npm和安装npm

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/127908.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • linux开启ssh命令(linux开启端口命令)

    在使用SSH时,经常会出现用sshsecureshellclient连接linux连接不上:解决方法如下: 如果没安装ssh,其安装过程:1.以root身份登入系统(没登入系统和没有足够的权限都不能安装,晕,这不是废话)2.检查安装系统时是否已经安装SSH服务端软件包: rpm-qa|grepopenssh 若显示结果中包含openssh-serve

    2022年4月14日
    384
  • pytest的assert_assert中文

    pytest的assert_assert中文前言断言是写自动化测试基本最重要的一步,一个用例没有断言,就失去了自动化测试的意义了。什么是断言呢?简单来讲就是实际结果和期望结果去对比,符合预期那就测试pass,不符合预期那就测试failed

    2022年7月31日
    7
  • C语言中按位取反_数组按位取反

    C语言中按位取反_数组按位取反与运算:&两者都为1为1,否则为01&1=1, 1&0=0, 0&1=0, 0&0=0或运算:|两者都为0为0,否则为11|1=1, 1|0=1, 0|1=1,0|0=0非运算:~1取0,0取1~1=0,~0=1~(10001)=01110异或运算两者相等为0,不等为11^1=0,

    2022年8月15日
    15
  • Android中mesure过程详解 –[通俗易懂]

    Android中mesure过程详解 –[通俗易懂]invalidate()最后会发起一个View树遍历的请求,并通过执行performTraersal()来响应该请求,performTraersal()正是对View树进行遍历和绘制的核心函数,内部的

    2022年8月1日
    8
  • java 各种架构图汇总

    java 各种架构图汇总java 各种架构图汇总

    2022年4月22日
    50
  • STM32驱动LCD1602程序(调试已成功)「建议收藏」

    STM32驱动LCD1602程序(调试已成功)「建议收藏」IO接线:RSPA8RWPB6EPB7LCD1602_IOPB8-PB15所有的口都配置成开漏输出,并且所有的口都通过10k电阻上拉至5V,部分电路图如下:程序代码LCD1602.C#include”lcd1602.h”voidLCD1602_GPIO_Init_Out()//LCD1602端口初始化,配置为输出{ GPIO_InitTypeDefGPIO_InitStructrue; RCC_APB2PeriphClockCmd(LCD1602_Timer_GPI

    2022年7月16日
    24

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号