반응형
마이그레이션 실패:호환되지 않는 피어 종속성 발견 - Angular를 버전 12로 업그레이드하는 중
앱을 Angular v11에서 Angular v12로 업그레이드하고 있습니다.Angular 패키지를 업그레이드할 때 다음 오류가 발생합니다.
ng update @angular/core@12 @angular/cli@12
Migration failed: Incompatible peer dependencies found
Package has an incompatible peer dependency to "@angular/common" (requires "^8.1.3 || ^9.0.0" (extended), would install "12.0.0").
Package has an incompatible peer dependency to "@angular/core" (requires "^8.1.3 || ^9.0.0" (extended), would install "12.0.0").
이러한 경고는 경고에 불과하지만 마이그레이션이 실패했습니다.
사용하도록 선택할 수 있습니다.--force호환되지 않는 피어 종속성을 무시하고 나중에 이러한 경고를 해결하는 옵션입니다.제가 그렇게 해야 하나요?그렇게 하면 호환되지 않는 피어 종속성을 가진 패키지가 손상됩니까?
저는 같은 문제에 직면했고 이것이 제가 해결하기 위해 취한 조치입니다.
- 노드 버전이 10보다 커야 합니다.
- 달려.
ng update @angular/core@12 @angular/cli@12아래와 같은 오류가 발생할 가능성이 높습니다.
Package "@angular-eslint/builder" has an incompatible peer dependency to "@angular/cli" (requires ">= 11.2.0 < 12.0.0", would install "12.0.0").
× Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
See "C:\Users\KOTIENO1\AppData\Local\Temp\ng-gY5FIE\angular-errors.log" for further details.
우리가 사용할 수 있는 경고 조언은--force경고를 무시합니다.지금은 그렇게 하겠습니다 3) 뛰세요ng update실행해야 하는 모든 명령이 반환됩니다.
Using package manager: 'npm'
Collecting installed dependencies...
Found 68 dependencies.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
-------------------------------------------------------------------------------------
@angular-eslint/schematics 4.2.0 -> 12.0.0 ng update @angular-eslint/schematics
@angular/cdk 11.2.11 -> 12.0.0 ng update @angular/cdk
@angular/cli 11.2.11 -> 12.0.0 ng update @angular/cli
@angular/core 11.2.12 -> 12.0.0 ng update @angular/core
@ngrx/store 11.1.1 -> 12.0.0 ng update @ngrx/store
There might be additional packages which don't provide 'ng update' capabilities that are outdated.
You can update the additional packages by running the update command of your package manager.
- 달려.
ng update @angular-eslint/schematics @angular/cdk @angular/cli @angular/core @ngrx/store --force이는 3단계에 따른 것으로, 사용자의 경우 약간 다를 수 있습니다.추가하는 것을 기억하십시오.--force깃발
여러 경고와 함께 성공적으로 실행됩니다.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: furaha-app@0.0.0
npm WARN Found: @angular/compiler-cli@12.0.0
npm WARN node_modules/@angular/compiler-cli
npm WARN @angular/compiler-cli@"~12.0.0" from the root project
npm WARN 3 more (@angular-devkit/build-angular, @angular/localize, ng-packagr)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer @angular/compiler-cli@"^12.0.0-next" from @angular-devkit/build-angular@12.0.0
npm WARN node_modules/@angular-devkit/build-angular
npm WARN @angular-devkit/build-angular@"~12.0.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: furaha-app@0.0.0
npm WARN Found: typescript@4.2.4
npm WARN node_modules/typescript
npm WARN typescript@"4.2.4" from the root project
npm WARN 4 more (@angular-devkit/build-angular, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript@"~4.2.3" from @angular-devkit/build-angular@12.0.0
npm WARN node_modules/@angular-devkit/build-angular
npm WARN @angular-devkit/build-angular@"~12.0.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: furaha-app@0.0.0
npm WARN Found: @angular/compiler@12.0.0
npm WARN node_modules/@angular/compiler
npm WARN @angular/compiler@"~12.0.0" from the root project
npm WARN 3 more (@angular/compiler-cli, @angular/localize, ng-packagr)
이 단계에서 당신의
package.json파일이 업데이트되었습니다.달려.ng serve모든 것이 예상대로 작동하는지 확인하기 위해경고를 확인합니다.대부분의 각도 관련 패키지는 버전 10 <= @dll/core <12를 예상하므로 호환성과 관련이 있습니다.이는 개별적으로 처리할 수 있습니다(예: 이러한 패키지 업데이트).
언급URL : https://stackoverflow.com/questions/67566416/migration-failed-incompatible-peer-dependencies-found-upgrading-angular-to-ve
반응형
'source' 카테고리의 다른 글
| 자신의 함수를 작성할 때 R의 생략 부호 기능을 사용하는 방법은 무엇입니까? (0) | 2023.06.08 |
|---|---|
| Vue & Vuex를 사용하여 필드 편집 (0) | 2023.06.08 |
| 서버에서 실행 속성 이해 (0) | 2023.06.08 |
| 스파크 데이터 프레임에 상수 열을 추가하는 방법은 무엇입니까? (0) | 2023.06.08 |
| ggplot2가 있는 나란히 표시 (0) | 2023.06.08 |