[英]Vulnerabilities with create-react-app React Js
Every time I create a react app with npx create-react-app <AppName>
, I get:每次我使用
npx create-react-app <AppName>
,我都会得到:
96 vulnerabilities found - Packages audited: 1682
Severity: 65 Moderate | 30 High | 1 Critical
Node Version: v14.18.1
Npm: 7.20.5
React: ^17.0.2
When I use npm audit fix
OR npm audit fix --force
, these are the results:当我使用
npm audit fix
或npm audit fix --force
,结果如下:
68 vulnerabilities (21 moderate, 45 high, 2 critical)
47 vulnerabilities (12 low, 18 moderate, 15 high, 2 critical)
58 vulnerabilities (16 moderate, 40 high, 2 critical)
48 vulnerabilities (12 low, 18 moderate, 16 high, 2 critical)
58 vulnerabilities (16 moderate, 40 high, 2 critical)
Here is the audit detail: Text File Link What I'm doing wrong?这是审计细节: 文本文件链接我做错了什么?
It's an NPM Bug.这是一个 NPM 错误。 See here for a longer explanation.
请参阅此处以获得更长的解释。 You just need to put
react-scripts
in dev dependices like that你只需要像这样将
react-scripts
放在开发依赖中
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
},
"devDependencies": {
"react-scripts": "4.0.3"
},
This issue has already been solved on GitHub.这个问题已经在 GitHub 上解决了。 https://github.com/facebook/create-react-app/issues/11174
https://github.com/facebook/create-react-app/issues/11174
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.