'Upgrade Angular - Two or more projects are using identical root warning
For updating Angular 8 to 9, I am following the official document to upgrade.
Which suggests first updating to the latest version of angular 8, like:
ng update @angular/core@8 @angular/cli@8
However, I am getting three warnings (all the same):
npm WARN notsup Unsupported engine for [email protected]: 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: [email protected]
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 [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] 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 [email protected] 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: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: 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.
Solution 1:[1]
specify the root property of second project to e2e in angular.json file
change this:
"myproject-e2e": {
"root": ""
}
to
"myproject-e2e": {
"root": "e2e",
Solution 2:[2]
In my case the following line was underlined and I removed it. It worked for me. If you have it in your project, you can try it..
{ ...
"styleext": "scss",
...
{
Solution 3:[3]
remove the "styleext": "scss" element on angular.json works for me my ng --version is 13.
Angular CLI: 13.3.6
This problem was solved
ng default workspace project instead.
Two or more projects are using identical roots. Unable to determine project using current working directory. ng 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. Schematic input does not validate against the Schema: {"prefix":"app","styleext":"scss","name":"/src/app/modu
Data path "" must NOT have additional properties(styleext).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Palak Jadav |
Solution 2 | |
Solution 3 | Ravinath |