简体   繁体   English

如何解决 REACT JS 中的漏洞

[英]How to solve vulnerabilities in REACT JS

I am an absolute beginner in React N/JS.我是 React N/JS 的绝对初学者。 I have been learning from several videos and tried creating an app using the npx create-react-app *app name* .我一直在从几个视频中学习并尝试使用npx create-react-app *app name*创建一个应用npx create-react-app *app name* I made the same app before which was running fine, but I started over with the same app after a couple of months and the terminal showed 58 vulnerabilities (16 moderate, 40 high, 2 critical) .我之前制作了运行良好的同一个应用程序,但几个月后我重新开始使用同一个应用程序,终端显示58 个漏洞(16 个中等,40 个高,2 个严重)

At first, I fixed it by running the command npm i --package-lock-only .起初,我通过运行命令npm i --package-lock-only修复它。 but then something happened and i had to reinstall VS Code, after which the vulnerabilities reappeared and now neither npm audit fix or npm audit fix --force , nor npm i --package-lock-only is working.但后来发生了一些事情,我不得不重新安装 VS Code,之后漏洞再次出现,现在npm audit fixnpm audit fix --force ,也没有npm i --package-lock-only工作。

As you can tell my technical terminologies are really weak, but I really hope I am making sense.正如你所知道的,我的技术术语真的很薄弱,但我真的希望我说得通。 Would really appreciate it if anyone could suggest me a solution!如果有人能给我建议一个解决方案,我将不胜感激!

it causes your node module's version different from your react version.它会导致您的节点模块的版本与您的反应版本不同。 to be sure to see your recommended react version of the installed node module.请务必查看您推荐的已安装节点模块的反应版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM