reactjs - 每次我使用 create-react-app 时都会出现漏洞

标签 reactjs create-react-app

enter image description here

使用 create-react-app 时存在 63 个漏洞,我该如何修复?

我运行了 npm 审核修复,修复了 63 个漏洞中的 0 个

enter image description here

最佳答案

您正在使用最新版本的node.js,这就是面临问题的原因。当前版本的节点存在各种错误。

使用旧版本的node.js可以解决该问题。

您可以继续循环播放此 issue并在修复后使用最新版本。

或者,您也可以排除低漏洞依赖性,如下所示,如问题中所述:

npm audit --registry=https://registry.npmjs.org --parseable | grep -V
 https://nodesecurity.io/advisories/786 | wc -l

或者,您可以使用npm-audit-resolver这比排除依赖项更好。

关于reactjs - 每次我使用 create-react-app 时都会出现漏洞,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55094274/

相关文章:

javascript - 在 React Native 上调节按钮

reactjs - 使用 UseReducer 和 useContext 钩子(Hook)进行调度 : dispatch does not exist on type {}

javascript - 在 React 和 axios 中使用不同的 API url 进行开发和生产

html - 在 create-react-app 中将图像直接加载到 index.html 的问题

node.js - CRA : The engine "node" is incompatible with this module. 即使我有最新 Node

javascript - react |从保存 URL 的变量导入图像 - 为什么我得到错误的路径?

reactjs - 无法使用 create-react-app 导入图像

javascript - setState react 生成数组结果

reactjs - React Redux - 在Reducer中添加异步方法是反模式吗?

javascript - React Native - ListView,CloneWithRow,对象不是数组