Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

typescript - Updating Angular 8 to Angular 9 unable to resolve dependency tree

I have been trying to update our Angular 8 to 9 except I keep running into an error about dependencies not being able to be resolved.

I tried updating the local CLI first but that gave me the same errors. My global CLI is updated as well. Running ng update @angular/cli@9 gives me the following error:

    Found: @angular-devkit/[email protected]
node_modules/@angular-devkit/build-angular
  dev @angular-devkit/build-angular@"^0.901.13" from the root project

Could not resolve dependency:
dev @angular-devkit/build-angular@"^0.901.13" from the root project

Conflicting peer dependency: @angular/[email protected]
node_modules/@angular/compiler-cli
  peer @angular/compiler-cli@">=9.0.0 < 10" from @angular-devkit/[email protected]
  node_modules/@angular-devkit/build-angular
    dev @angular-devkit/build-angular@"^0.901.13" from the root project

Following the Angular update tool doesn't seem of much help. How do I go about fixing this error?

question from:https://stackoverflow.com/questions/65919445/updating-angular-8-to-angular-9-unable-to-resolve-dependency-tree

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have no idea what causes the issue but running the exact same steps on a different machine solved it. Both machines run the same versions of node/npm/angular CLI etc. Cannot tell what the issue was.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...