【问题标题】:npm audit fix --forcenpm 审计修复 --force
【发布时间】:2020-06-30 09:35:26
【问题描述】:

我想摆脱我的脆弱性并使用

npm audit fix --force

但我在几行后取消了它,因为它说:“我希望你知道你在做什么”

现在如果我尝试

npm install

我明白了

$ npm install
npm WARN @angular-devkit/build-angular@0.900.7 requires a peer of typescript@>=3.6 < 3.8 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@9.0.7 requires a peer of typescript@>=3.6 < 3.8 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/compiler-cli@9.0.7 requires a peer of typescript@>=3.6 <3.8 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser-dynamic@8.1.3 requires a peer of @angular/compiler@8.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@9.0.7 requires a peer of typescript@>=3.6 < 3.8 but none is installed. You must install peer dependencies yourself.
npm WARN ts-jest@24.0.2 requires a peer of jest@>=24 <25 but none is installed. You must install peer dependencies yourself.

audited 1219421 packages in 12.454s

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

found 23 vulnerabilities (21 low, 2 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details

如果我安装@angular/compiler@8.1.3,我需要@angular/compiler@9.0.7,反之亦然

【问题讨论】:

    标签: npm dependencies npm-install


    【解决方案1】:

    我遇到了同样的问题,我通过运行“ng update”命令解决了这个问题,该命令将为您提供需要更新的软件包以及更新它的命令。希望这对您有所帮助。

    【讨论】:

    • 我认为问题是关于 NPM。不是关于NG。它可以有不同版本的 WebPack 和 Angular。
    猜你喜欢
    • 2018-11-18
    • 2021-09-07
    • 2019-02-07
    • 2019-01-12
    • 2021-07-10
    • 1970-01-01
    • 1970-01-01
    • 2019-01-25
    • 2021-08-27
    相关资源
    最近更新 更多