ng 从 7 更新到 8 不会更新代码

Jea*_*eri 5 angular-cli angular

我想从角度 7 更新到角度 8。这就是我所做的。首先我跑了yarn upgrade --latest。我注意到这会给我 typescript 3.6.3,这对于 Angular 来说太新了,所以我将其降级到 3.5.3。现在,当我尝试运行我的应用程序时,我收到很多错误(例如 @ViewChild 缺少参数)

所以,我想,这可以通过以下方式解决ng update -all

$> ng update --all
Using package manager: 'yarn'
Collecting installed dependencies...
Found 66 dependencies.
              Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.4 <3.6", would install "3.6.3").
Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
Run Code Online (Sandbox Code Playgroud)

它想更新typescript到3.6.3。现在,当我运行这个命令时,--force它确实只更新打字稿。如此看来:ng update --all === yarn upgrade --latest

我的问题是ng update也可以修复我的代码,我有这样的印象,但我没有看到那种魔力。