Juu*_*uro 7 dependencies npm angular agm
我正在开发一个 Angular 组件库,自从更新到 Angular 13 以来,npm i @our/library@14.1.1-beta.1我们的库出现了一些错误:
npm ERR! While resolving: test-app@0.0.0
npm ERR! Found: @angular/common@13.2.7
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"~13.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^6.0.0 || ^7.0.0 || ^8.0.0" from @agm/core@1.1.0
npm ERR! node_modules/@agm/core
npm ERR! peer @agm/core@"^1.1.0" from @our/library@14.1.1-beta.1
npm ERR! node_modules/@our/library
npm ERR! @our/library@"14.1.1-beta.1" from the root project
Run Code Online (Sandbox Code Playgroud)
所以在我看来,它@agm/core@1.1.0具有@angular/common@"^6.0.0 || ^7.0.0 || ^8.0.0"与 不兼容的依赖项@angular/common@"~13.2.0"。那是对的吗?
我尝试将@angular/common@8.0.0依赖项添加到我们的库中,但这没有做任何事情,安装错误仍然存在。
安装可以使用该--legacy-peer-deps标志,但听起来这不是正确的安装方法。我使用 npm v8.5.0 和 Node v14.18.2。
那么除了删除和使用不同的东西之外,还有其他解决方案吗@agm/core?
Jus*_*ets -4
运行npm install --legacy-peer-deps将修复错误。实际上,某些依赖项与新/旧的 Angular 版本不兼容。安装对等依赖项安装必要的依赖项才能工作。它在本地为特定插件而不是应用程序安装依赖项。
| 归档时间: |
|
| 查看次数: |
12282 次 |
| 最近记录: |