gpt4 book ai didi

reactjs - 如何解决使用 create-react-app 创建的应用程序中的 postcss 漏洞

转载 作者:行者123 更新时间:2023-12-04 14:58:01 26 4
gpt4 key购买 nike

我在 1 个月前使用 create-react-app 创建了一个新应用,最近我从 npm update 收到了这条消息:

80 moderate severity vulnerabilities

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

npm audit 给我:

postcss  7.0.0 - 8.2.9
Severity: moderate
Regular Expression Denial of Service - https://npmjs.com/advisories/1693
fix available via `npm audit fix --force`
Will install react-scripts@2.1.8, which is a breaking change

我尝试了 npm audit fix 但没有任何变化,并且 npm audit fix --force 安装了旧版本的 react-script(当前 4.0.3 到 2.1.8)所以这似乎不是一个好的解决方案。

npm install postcss@latest --savenpm install postcss@8.2.15 --save 也没有任何改变。

修复此漏洞的最佳方法是什么?

最佳答案

此问题已在此处得到解答:https://stackoverflow.com/a/67502823/8499653

对 postcss 8 的支持已经合并,可能很快就会发布

你可以使用 npm 包 npm-force-resolutions 来临时解决这个问题

关于reactjs - 如何解决使用 create-react-app 创建的应用程序中的 postcss 漏洞,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67577347/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com