gpt4 book ai didi

javascript - ionic : ERESOLVE could not resolve: Found: rxjs@7. x.x

转载 作者:行者123 更新时间:2023-12-03 07:59:44 35 4
gpt4 key购买 nike

有人在尝试使用电容器构建 ionic 项目时遇到此问题吗?

我有一个 Ionic 项目,其中每个功能都有不同的包。我正在尝试使用 ionic 电容器构建 android 将我的项目导出到 android studio。我还尝试创建一个带有空白页面的新项目,效果很好。我的怀疑是 native 包,但我不知道如何解决这个问题,因为我是 Angular 和 ionic 的新手。

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @ionic-native/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="43202c312603766d70756d73" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! Found: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7b090311083b4c554f554b" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/rxjs
npm ERR! peer rxjs@"^6.5.3 || ^7.4.0" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="81e2eeececeeefc1b0b4afb1afb3" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"15.0.2" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c9afa6bba4ba89f8fce7f9e7fb" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@">=12.0.0" from @ionic/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="44252a233128253604726a776a7d" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@ionic/angular
npm ERR! @ionic/angular@"^6.3.9" from the root project
npm ERR! 1 more (the root project)
npm ERR! peer @angular/common@"15.0.2" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9aeaf6fbeefcf5e8f7b7f8e8f5ede9ffe8daabafb4aab4a8" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/platform-browser
npm ERR! peer @angular/platform-browser@"15.0.2" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="791f160b140a39484c5749574b" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@">=12.0.0" from @ionic/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="90f1fef7e5fcf1e2d0a6bea3bea9" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@ionic/angular
npm ERR! 1 more (the root project)
npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project)
npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project)
npm ERR! peer rxjs@"^6.5.3 || ^7.4.0" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6c0f031e092c5d59425c425e" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/core
npm ERR! peer @angular/core@"15.0.2" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="87e4e8eaeae8e9c7b6b2a9b7a9b5" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"15.0.2" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e68089948b95a6d7d3c8d6c8d4" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@">=12.0.0" from @ionic/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="06676861736a677446302835283f" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@ionic/angular
npm ERR! 1 more (the root project)
npm ERR! 4 more (@angular/platform-browser, ...)
npm ERR! peerOptional @angular/core@"15.0.2" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a6c5c9cbd6cfcac3d4e6979388968894" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/compiler
npm ERR! peer @angular/compiler@"15.0.2" from @angular/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="55363a38253c3930277836393c1564607b657b67" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular/compiler-cli
npm ERR! peer @angular/compiler-cli@"^15.0.0" from @angular-devkit/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="402235292c246d212e27352c21320071756e706e72" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@angular-devkit/build-angular
npm ERR! 2 more (@ngtools/webpack, the root project)
npm ERR! 2 more (@angular/platform-browser-dynamic, the root project)
npm ERR! 7 more (@angular/forms, @angular/platform-browser, ...)
npm ERR! 5 more (@angular/forms, @angular/router, @ionic/angular, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^5.5.0 || ^6.5.0" from @ionic-native/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="55363a273015607b66637b65" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@ionic-native/core
npm ERR! peer @ionic-native/core@"^5.1.0" from @ionic-native/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="39575c4d4e564b52790c170a0f1709" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@ionic-native/network
npm ERR! @ionic-native/network@"^5.36.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a1d3d9cbd2e1978f978f96" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/rxjs
npm ERR! peer rxjs@"^5.5.0 || ^6.5.0" from @ionic-native/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5f3c302d3a1f6a716c69716f" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@ionic-native/core
npm ERR! peer @ionic-native/core@"^5.1.0" from @ionic-native/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2a444f5e5d4558416a1f04191c041a" rel="noreferrer noopener nofollow">[email protected]</a>
npm ERR! node_modules/@ionic-native/network
npm ERR! @ionic-native/network@"^5.36.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

最佳答案

您存在依赖冲突,可能是因为 @ionic-native 包装器不再更新,并且 Ionic 使用最新的 Angular 15。

尝试将所有 @ionic-native 软件包替换为其 @awesome-cordova-plugins 对应软件包。

EX 1:npm un @ionic-native/core && npm i @awesome-cordova-plugins/core

EX 2:npm un @ionic-native/social-sharing && npm i @awesome-cordova-plugins/social-sharing

等等...

如果您在执行此操作时遇到相同的错误,请在每个 npm i 命令后添加 --force 标志。

关于javascript - ionic : ERESOLVE could not resolve: Found: rxjs@7. x.x,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74711601/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com