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

标签 angular angular8 angular9 angular-upgrade

为了将 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.

最佳答案

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

改变这个:

"myproject-e2e": {
  "root": ""
 }

"myproject-e2e": {
  "root": "e2e",

关于angular - 升级 Angular - 两个或多个项目正在使用相同的根警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61884665/

相关文章:

angular - 身份验证后路由器导航重定向不会呈现组件

Angular react 形式 - 当用户将 UI 更改恢复为原始值时,原始值是否会重置?

angular - 7 - 8 条动态路线

angular - 更新 Angular 8.0 后,模块没有导出的成员组件

javascript - AJAX 请求不适用于本地主机 CORS 策略

carousel - 无法将 ng-bootstrap 与 angular 9 一起使用

Angular - 如何在 Angular 9 - Ivy 中进行代码拆分?

angular2 包括外部 html 模板

angular - MSAL、Angular 和 ASP.NET Core 的 CORS 错误

javascript - 在圆圈内裁剪base64图像数据