ionic:npm 错误! ERESOLVE 无法解析依赖树

问题描述 投票:0回答:1

我在尝试这样做时遇到了这个问题

npm install @ionic-native/sqlite
有谁知道如何修理它?谢谢!

这里是npm解析错误报告:

While resolving: [email protected]
Found: [email protected]
node_modules/rxjs
  rxjs@"~7.8.0" from the root project

Could not resolve dependency:
peer rxjs@"^5.5.0 || ^6.5.0" from @ionic-native/[email protected]
node_modules/@ionic-native/core
  peer @ionic-native/core@"^5.1.0" from @ionic-native/[email protected]
  node_modules/@ionic-native/sqlite
    @ionic-native/sqlite@"*" from the root project

Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

我用 --force, --legacy-peer-depstried 重新执行了这个命令,并在网上搜索,有一些相关的答案,但仍然没有解决这个问题。

ionic-framework rxjs npm-install
1个回答
0
投票

通过删除或运行以下命令来删除

node_modules
package-lock.json
yarn.lock

rm -rf node_modules package-lock.json

检查 package.json 文件中的

rxjs
版本并将其更新为同时满足
@ionic-native/core
和其他依赖项的版本。

请尝试一下可能会有效..

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