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)
- @agm/core 是否有与 Angular 16 兼容的版本?
- 是否有替代库或方法可以在不降级 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/