执行npm install 出现如下提醒

added 253 packages from 162 contributors and audited 1117 packages in 42.157s
found 5 vulnerabilities (1 low, 4 high)
run npm audit fix to fix them, or npm audit for details html
按照控制台提示的命令,输入‘npm audit fix’后,控制台提示:
总结下命令:
运行audit fix,但是只更新pkglock, 不更新node_modules:

$ npm audit fix --package-lock-only
只更新dependencies中安装的包,跳过devDependencies中的包:

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

$ npm audit fix --dry-run --json
得到json格式的详细检测报告

$ npm audit --json
附参考资料:
npm-audit 官网地址:https://docs.npmjs.com/cli/audit

Logo

前往低代码交流专区

更多推荐