1

不断遇到这个问题,在我的新 github repo 中,清理缓存,再次安装 npm 但现在似乎没有任何工作,我该怎么办?我怎样才能解决这个问题?

即使我做 npm audit fix 它一次又一次地返回以下代码。

up to date, audited 1778 packages in 13s

49 packages are looking for funding
  run `npm fund` for details

31 vulnerabilities (24 low, 3 moderate, 4 high)

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

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

Run `npm audit` for details.
4

3 回答 3

1

这没什么好担心的。基本上正在发生的事情是您正在使用的软件包中存在一些问题。本质上,如果您更新它们,它们会破坏其他东西,因此除非维护人员修复它,否则它们会被冻结。如果您愿意,您可以自己修复它们,但通常需要付出太多努力。除了等到它们被修复,也就是说,如果维护者决定修复它们,你无能为力

于 2021-02-22T10:29:51.260 回答
0

有些错误需要手动调试,npm 本身无法修复。所以你需要自己解决问题。

于 2021-02-22T09:41:04.277 回答
0

您可以使用npm-force-resolution包解决它

添加具有易受攻击依赖的解决方案部分

"resolutions": {
  "lodash": "^4.17.5"
}

然后运行

rm -r node_modules
npx npm-force-resolutions
npm install 
于 2021-02-22T09:50:05.497 回答