升级 Angular - 两个或多个项目正在使用相同的根警告

Hwa*_*ang 5 angular-upgrade angular angular8 angular9

对于Angular 8到9的更新,我是按照官方文档进行升级的。

这建议首先更新到最新版本的 Angular 8,例如:

ng update @angular/core@8 @angular/cli@8

但是,我收到三个警告(全部相同):

npm WARN notsup Unsupported engine for watchpack-chokidar2@2.0.0: wanted: {"node":"<8.10.0"} (current: {"node":"12.16.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: watchpack-chokidar2@2.0.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN ngx-multi-window@0.3.2 requires a peer of @angular/common@^6.0.0-rc.0 || ^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-multi-window@0.3.2 requires a peer of @angular/core@^6.0.0-rc.0 || ^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 369 packages from 99 contributors, removed 29 packages, updated 172 packages, moved 2 packages and audited 1664 packages in 109.259s

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

found 873 vulnerabilities (639 low, 6 moderate, 227 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
Two or more projects are using identical roots. Unable to determine project using current working directory. Using default workspace project instead.
Run Code Online (Sandbox Code Playgroud)

Pal*_*dav 9

在 angular.json 文件中将第二个项目的 root 属性指定为 e2e

改变这个:

"myproject-e2e": {
  "root": ""
 }
Run Code Online (Sandbox Code Playgroud)

"myproject-e2e": {
  "root": "e2e",
Run Code Online (Sandbox Code Playgroud)