执行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. 一分钟在云端快速创建MySQL数据库实例

    本教程将帮助您了解如何使用Azure管理门户迅速创建,连接,配置MySQL 数据库 on Azure.完成本教程后,您将在Azure上拥有一个示例MySQL数据库服务器,并了解如何使用管理门户执行基本 ...

  2. CentOS随笔 - 1.虚拟机VMware安装CentOS7系统

    前言 转帖请注明出处: http://www.cnblogs.com/Troy-Lv5/ 需要安装CentOS首先你得下载安装镜像文件(地址: https://www.centos.org/downl ...

  3. 常见网络编程面试题答案征集与面试题(收集) ZZ 【网络编程】

    http://www.cnblogs.com/wickedboy237/archive/2013/05/12/3074362.html 1:tcp和udp的区别2:流量控制和拥塞控制的实现机制3:滑动 ...

  4. SqlServer数据库(可疑)的解决办法

    当数据库发生这种操作故障时,可以按如下操作步骤可解决此方法, 打开数据库里的Sql 查询编辑器窗口,运行以下的命令. // 1.使用指定值强制重新配置:(1.0表示为真假) sp_configure ...

  5. 面向对象进阶------>内置函数 str repr new call 方法

    __new__方法: 我们来讲个非常非常重要的内置函数和init一样重要__new__其实在实例话对象的开始  是先继承父类中的new方法再执行init的  就好比你生孩子 先要把孩子生出来才能对孩子 ...

  6. MVC与WebApi中的异常过滤器

    一.MVC的异常过滤器   1.自定义MVC异常过滤器 创建一个类,继承HandleErrorAttribute即可,如果不需要作为特性使用直接实现IExceptionFilter接口即可, 注意,该 ...

  7. 第六次作业——Excel制作工资表

  8. Asp.Net MVC Identity 2.2.1 使用技巧(三)

    使用用户管理器之用户注册 用户管理的基本功能模块中已经做好了,我们现在做一些调整. 1.修改用户名注册规则. 上一篇中可选操作已经详解了这里把基本的设置简介下. 打开App_Start/identit ...

  9. HTML5 拖放、交换位置

    设置元素为可拖放 draggable 属性设置为 true: <img draggable="true" /> 拖动什么 - ondragstart 和 setData ...

  10. MongoDB authentication failed

    0.随笔摘要: MongoDB  安装配置 MongoDB  权限控制 MongoDB  注意事项 authentication failed 1.MongoDB  下载安装配置 MongoDB官网  ...