首页 > 解决方案 > 发现 1 个低严重性漏洞错误,同时创建新的反应项目

问题描述

当我使用 > npx create-react-app my-app 创建反应项目时,它向我显示一个错误:

发现 1 个低严重性漏洞运行npm audit fix以修复它们,或npm audit获取详细信息。

我尝试使用 npm audit fix 解决此问题,但它不起作用。

                   === npm audit security report ===


                             Manual Review
         Some vulnerabilities require your attention to resolve

      Visit https://go.npm.me/audit-guide for additional guidance




Low             Prototype Pollution

  Package         yargs-parser

  Patched in      >=13.1.2 <14.0.0 || >=15.0.1 <16.0.0 || >=18.1.2

  Dependency of   react-scripts

  Path            react-scripts > webpack-dev-server > yargs > yargs-parser

  More info       https://npmjs.com/advisories/1500

found 1 low severity vulnerability in 1618 scanned packages
  1 vulnerability requires manual review. See the full report for details.

标签: javascriptreactjs

解决方案


这些低安全漏洞不应该阻止你,这在 npm 生态系统中有点“正常”。在 Create React App 的上下文中,这不是一个真正的“漏洞”,因为它会生成静态包,但如果您恢复依赖项,它应该会消失。

npm --depth 999 update set-value && npm --depth 999 update mixin-deep

推荐阅读