【问题标题】:whille creating a react app ,process stops and shows 1 vulnerablity (run npm audit)在创建反应应用程序时,进程停止并显示 1 个漏洞(运行 npm 审计)
【发布时间】:2020-06-09 15:11:58
【问题描述】:

在运行 npx create-react-app app-name 时,进程会在运行 npm audit fix 时自动停止,并且不会显示任何错误

我也使用了不同的命令来解决这个问题

update npm globally

npm install -g create-react-app

create-react-app my-app

install yarn

yarn create react-app my-app

npm cache clean --force

npx create-react-app my-app

但对我没有任何作用,它总是在运行 npm 审计漏洞时停止

    PS D:\mern> npx create-react-app client    

Creating a new React app in D:\mern\client.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...


> core-js@2.6.11 postinstall D:\mern\client\node_modules\babel-runtime\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.6.5 postinstall D:\mern\client\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js-pure@3.6.5 postinstall D:\mern\client\node_modules\core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

+ cra-template@1.0.3
+ react-scripts@3.4.1
+ react@16.13.1
+ react-dom@16.13.1
added 1626 packages from 750 contributors and audited 1630 packages in 257.371s

59 packages are looking for funding
  run `npm fund` for details

【问题讨论】:

    标签: node.js reactjs react-native npm


    【解决方案1】:

    好吧,您可以运行npm audit fix 来尝试修复它。 有些项目确实有 1 个或多个漏洞,可悲的是,这是正常的 如果npm audit fix 没有帮助,请尝试npm audit fix --force

    [编辑] 另外,如命令输出所述:

    添加了来自 750 个贡献者的 1626 个包,并在 257.371 秒内审核了 1630 个包

    软件包已添加,没有错误,只是一个关于最近添加的 1626 个软件包中的一个漏洞的警报。

    所以如果你不关心那个漏洞,你可以编译你的项目。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-03-15
      • 2017-10-22
      • 2018-12-30
      • 1970-01-01
      • 2021-05-03
      • 2022-01-16
      • 2020-11-22
      相关资源
      最近更新 更多