执行npm install 出现如下提醒

 
  1. added 253 packages from 162 contributors and audited 1117 packages in 42.157s

  2. found 5 vulnerabilities (1 low, 4 high)

  3. run `npm audit fix` to fix them, or `npm audit` for details html

按照控制台提示的命令,输入‘npm audit fix’后,控制台提示:

 
  1. 1 package update for 5 vulns involved breaking changes

  2. (use `npm audit fix --force` to install breaking changes; or do it by hand)

输入:‘npm audit fix --force’后,控制台提示:

 
  1. added 199 packages from 111 contributors, removed 64 packages and updated 23 packages in 42.194sfixed 5 of 5 vulnerabilities in 1117 scanned packages

  2. 1 package update for 5 vulns involved breaking changes

  3. (installed due to `--force` option)

重新输入‘npm audit’:

 
  1. === npm audit security report ===

  2. found 0 vulnerabilities

  3. in 4598 scanned packages

终于一切正常。

出于好奇,从npm官网上查阅了对于npm audit fix的相关介绍。

npm audit : npm@5.10.0 & npm@6,允许开发人员分析复杂的代码,并查明特定的漏洞和缺陷。

npm audit fix :npm@6.1.0,  检测项目依赖中的漏洞并自动安装需要更新的有漏洞的依赖,而不必再自己进行跟踪和修复。

同时,官网中还提供了一些其他的命令,整理如下:

1. 运行audit fix,但是只更新pkglock, 不更新node_modules:

$ npm audit fix --package-lock-only

2. 只更新dependencies中安装的包,跳过devDependencies中的包:

$ npm audit fix --only=prod

3.运行命令,得到audit fix将会更新的内容,并且输出json格式的安装信息,但是并不真的安装更新:

$ npm audit fix --dry-run --json

4. 得到json格式的详细检测报告

$ npm audit --json

npm audit fix的更多相关文章

  1. found 12 vulnerabilities (7 moderate, 5 high) run `npm audit fix` to fix them, or `npm audit` for details

    npm 安装包之后,如果出现类似下面的信息 found 12 vulnerabilities (7 moderate, 5 high) run `npm audit fix` to fix them, ...

  2. npm run dev 报错 run `npm audit fix` to fix them, or `npm audit` for details

    前几天写的直接运行npm run dev还是ok的,突然不行了,前面报错是css-loader没有,删除style标签上的lang='scss'就好了,先不需要这个依赖.这个先不管. 只是后面的 ru ...

  3. run `npm audit fix` to fix them, or `npm audit` for details

    问题 added 246 packages from 681 contributors and audited 382 packages in 17.509s found 13 vulnerabili ...

  4. 报错--"npm audit fix" or "npm audit"

    如图: 根据提示输入 npm audit fix --force 如图: 根据提示输入: npm audit

  5. 解决npm安装时出现run `npm audit fix` to fix them, or `npm audit` for details 的问题

    npm audit fix npm audit fix --force npm audit 按照顺序一一运行亲测完全可用如果还是不行的话,可以把node_modules和package-lock.js ...

  6. 关于npm audit fix

    https://blog.csdn.net/weixin_40817115/article/details/81007774 npm audit : npm@5.10.0 & npm@6,允许 ...

  7. 未解决:found 1 high severity vulnerability run `npm audit fix` to fix them, or `npm audit` for details

    问题出现: 在通过 `ng new hello-world` 命令新建项目时,项目出现以下警告: found high severity vulnerability run `npm audit fi ...

  8. 转载:解决npm安装时出现run `npm audit fix` to fix them, or `npm audit` for details

    转载自:https://blog.csdn.net/qq_39165556/article/details/89333028 1.第一种解决办法 npm audit fix npm audit fix ...

  9. 【记录】vue构建项目npm install错误run `npm audit fix` to fix them, or `npm audit` for details

    今天构建vue项目执行npm install初始化后报错 run `npm audit fix` to fix them, or `npm audit` for details 出现这问题控制台会有一 ...

随机推荐

  1. PyCharm2018 安装及破解方法

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u012278016/article/details/81738676 目录 1>. 安装 2& ...

  2. cache2go开源项目的回调方法使用

    https://github.com/muesli/cache2go 结构体 type CacheTable struct { sync.RWMutex . name string items map ...

  3. awk 正则表达式、正则运算符详细介绍

    前言:使用awk作为文本处理工具,正则表达式是少不了的. 要掌握这个工具的正则表达式使用.其实,我们不必单独去学习它的正则表达式.正则表达式就像一门程序语言,有自己语法规则已经表示意思. 对于不同工具 ...

  4. 沉淀再出发:java的文件读写

    沉淀再出发:java的文件读写 一.前言 对于java的文件读写是我们必须使用的一项基本技能,因此了解其中的原理,字节流和字符流的本质有着重要的意义. 二.java中的I/O操作 2.1.文件读写的本 ...

  5. 沉淀,再出发:python中的pandas包

    沉淀,再出发:python中的pandas包 一.前言 python中有很多的包,正是因为这些包工具才使得python能够如此强大,无论是在数据处理还是在web开发,python都发挥着重要的作用,下 ...

  6. python 函数式编程之lambda( ), map( ), reduce( ), filter( )

    lambda( ), map( ), reduce( ), filter( ) 1. lambda( )主要用于“行内函数”: f = lambda x : x + 2 #定义函数f(x)=x+2 g ...

  7. Linux命令--用户管理

    useradd命令 Linux useradd命令用于建立用户帐号. useradd可用来建立用户帐号.帐号建好之后,再用passwd设定帐号的密码.而可用userdel删除帐号.使用useradd指 ...

  8. [attribute |= value] 与 [attribute ^= value],[attribute ~= value] 与 [attribute *= value] 的联系与区别

    [attribute |= value] 与 [attribute ^= value] 的联系与区别: 一.联系: 1. 两个选择器的 attribute 属性值等于 value 时都可以匹配 < ...

  9. PHP笔记09:PHP之 MVC理解

    1. 首先通俗地说说我对MVC的理解: Model是负责干活的,它干的活主要是从数据库中获取需要的数据以及对获取的数据按照业务逻辑进行加工处理,至于为什么要干某件活,何时干某件活它一概不管,而这正是C ...

  10. BZOJ3175:[TJOI2013]攻击装置(二分图最大独立集)

    Description 给定一个01矩阵,其中你可以在0的位置放置攻击装置.每一个攻击装置(x,y)都可以按照“日”字攻击其周围的 8个位置(x-1,y-2),(x-2,y-1),(x+1,y-2), ...