使用 Angular 16.2.3 安装 @agm/core 时出现 npm ERESOLVE 错误

问题描述 投票:0回答:1
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^16.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^9.1.0 || ^10.0.0" from @agm/[email protected]
npm ERR! node_modules/@agm/core
npm ERR!   @agm/core@"*" from the root project

无法使用 Angular 16.2.3 安装 @agm/core

问题

我正在开发一个需要 Google 地图集成的 Angular 项目。我尝试安装

@agm/core
软件包,但收到
npm ERR! ERESOLVE
错误。

我的项目使用Angular版本16.2.3,在

package.json
中指定为:

"@angular/common": "^16.1.0",

我想在我的 Angular 项目中安装 Angular Google Maps (AGM)

  1. @agm/core 是否有与 Angular 16 兼容的版本?
  2. 是否有替代库或方法可以在不降级 Angular 的情况下集成 Google 地图?
angular google-maps npm dependency-management agm-core
1个回答
0
投票

这个库不再受支持,如在 repo 上看到的。

根据对等部门,它仅支持 v9/10。另外,v16 中已经删除了对非 ivy 库的支持,所以即使你强制安装 deps,它也不起作用。

© www.soinside.com 2019 - 2024. All rights reserved.