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

标签 angular google-maps npm dependency-management agm-core

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c1b1a0b3aaa3a8ada6a881f1eff1eff1" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! Found: @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e88b8785858786a8d9dec6dac6db" rel="noreferrer noopener nofollow">[email protected]</a>
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/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d8bbb7aabd98ebf6e8f6e8f5babdacb9f6e8" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@agm/core
npm ERR!   @agm/core@"*" from the root project

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

问题

我正在开发一个需要 Google map 集成的 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 map ?

最佳答案

如您在 the repo 上看到的,该库不再受支持.

根据对等部门,它仅支持 v9/10。另外,v16 中已经删除了对非 ivy 库的支持,因此即使您强制安装 deps,它也无法工作。

关于angular - 使用 Angular 16.2.3 安装 @agm/core 时出现 npm ERESOLVE 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/77017543/

相关文章:

html - ng-bootstrap TimePicker 微调器轮廓可见

css - 如何在 Ionic 3 的 ion-navbar 中内联按钮和 ion-title?

html - angular 4 应用程序不填满屏幕高度

android - 如何在 Android 的自定义 InfoWindow 中将不仅仅是标题和 fragment 传递给 getInfoContents

npm - 当预发布版本是最新可用版本时,semver 中的插入符号 (^) 是否与预发布匹配?

javascript - 如何在 Ionic 3 和 Angular 4 中禁用表单验证?

java - Android 中谷歌地图的聚类

ios - Ionic 3 - 使用 Google map /Apple map 应用程序无需导航即可打开地理定位

android - phonegap 无法安装或正常工作

node.js - 在 Ubuntu 14.04 上安装 Node 5.x 和最新或正在运行的 npm