我正在升级我的angular 10项目,它运行在node 14.x和npm 6.14.x上,
npm ls
在NPM中显示以下问题,
"problems": [
"peer dep missing: @angular/common@^9.0.0, required by @fullcalendar/[email protected]",
"peer dep missing: @angular/common@^9.0.0, required by @ng-idle/[email protected]",
"peer dep missing: @angular/common@^9.0.0, required by @ng-idle/[email protected]",
"peer dep missing: @angular/common@^9.0.0, required by @ngx-toolkit/[email protected]",
"peer dep missing: @angular/common@^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0, required by [email protected]",
"peer dep missing: @angular/core@^9.0.0, required by @fullcalendar/[email protected]",
"peer dep missing: @angular/core@^9.0.0, required by @ng-idle/[email protected]",
"peer dep missing: @angular/core@^9.0.0, required by @ng-idle/[email protected]",
"peer dep missing: @angular/core@^9.0.0, required by @ngx-toolkit/[email protected]",
"peer dep missing: @angular/core@ ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0, required by [email protected]",
"peer dep missing: jest@^24.1.0, required by [email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: [email protected] - 3, required by [email protected]",
"peer dep missing: popper.js@^1.16.0, required by [email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: jest@^24.1.0, required by [email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: jest@>=24 <25, required by [email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @fullcalendar/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]",
"peer dep missing: tslib@^1.10.0, required by @ng-idle/[email protected]"
]
那么我应该怎么做来解决这些问题呢?(请记住,我正在尝试升级node和npm),似乎是peer dependency错误,我应该使用npm install --legacy-peer-deps吗?
解决所有这些对等依赖性错误的解决方案?
1条答案
按热度按时间bbmckpt71#
当将项目升级到Angular的新版本时,最好遵循the angular update guide并使用
ng upgrade
进行更新。许多第一方Angular软件包相互依赖,只有在使用Angular团队定义的版本时才能一起工作。任何第三方Angular库(在正确构建时)都会在其package.json中定义
peerDependencies
,以告诉您他们的包已经过测试并且可能会工作的版本。任何较新的主要版本都不能保证工作。当看到
npm ls
的输出时,我认为你可以:所以我建议你首先尝试更新你的第三方软件包(最好使用
ng update
),如果警告仍然存在,就给予你的应用一个尝试。如果它不起作用,那么你必须等待支持...