glob-parent <5.1.2
Severity: moderate
Regular expression denial of service - https://npmjs.com/advisories/1751
fix available via `npm audit fix`
node_modules/watchpack-chokidar2/node_modules/glob-parent
chokidar 1.0.0-rc1 - 2.1.8
Depends on vulnerable versions of glob-parent
node_modules/watchpack-chokidar2/node_modules/chokidar
watchpack-chokidar2 *
Depends on vulnerable versions of chokidar
node_modules/watchpack-chokidar2
watchpack 1.7.2 - 1.7.5
Depends on vulnerable versions of watchpack-chokidar2
node_modules/watchpack
我只是将 cookie-parser 安装到 cmd。如上所述,有 4 个温和派。
我的 glob-parent -v 目前是 7.19.1
'npm audit' 和 'npm audit fix' 不起作用
我应该怎么做?
最佳答案
在您的 package.json 中,在脚本下添加此目标:
"preinstall": "npx npm-force-resolutions"
然后在脚本下面添加:"resolutions": {
"glob-parent": "^6.0.1"
}
有一件事,我不知道任何使用旧版本的依赖包是否会因为 6.0.1 而损坏。
关于javascript - 如何解决这个 npm glob-parent 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68333071/