无法将 Angular 从 6 升级到 7

Cant upgrade Angular from 6 to 7

当我触发 ng update 时,它会显示 @angular/core 的两个条目。 当我开火时 ng update @angular/core 它会变成 8 形式 6

Collecting installed dependencies...
Found 99 dependencies.
Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
    We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cdk                       6.4.7 -> 8.2.2           ng update @angular/cdk
      @angular/core                      6.1.10 -> 8.2.9          ng update @angular/core
      @angular/core                      6.1.10 -> 7.2.15         ng update @angular/core
      @angular/material                  6.4.7 -> 8.2.2           ng update @angular/material

您需要指定版本,否则它将更新到最新版本。

ng 更新@angular/cli@7.0.0 @angular/core@7.0.0

在更新之前您可能需要做进一步的更改。

请参阅此 link 了解更多信息 https://update.angular.io/#6.0:7.0