gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 09:57:51 27 4
gpt4 key购买 nike

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

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com