Upgrade Angular - Two or more projects are using identical root warning
Asked Answered
S

3

7

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.
Seismism answered 19/5, 2020 at 6:35 Comment(0)
S
11

specify the root property of second project to e2e in angular.json file

change this:

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

to

"myproject-e2e": {
  "root": "e2e",
Swetlana answered 19/5, 2020 at 13:52 Comment(1)
Wouldn't that imply it's a testing project? What does that buy you, exactly?Chimaera
C
2

enter image description here

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",
   ...
{
Cally answered 24/4, 2022 at 23:29 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Aqueous
Rather change styleext to style. This worked for me. https://mcmap.net/q/93540/-using-scss-as-default-style-sheet-in-angular-6-styleextCohl
G
0

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).
Gerundive answered 26/5, 2022 at 9:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.