cordova 我无法在ionic 6上安装插件,出现此错误,我该怎么办?

ih99xse1  于 2022-11-15  发布在  Ionic
关注(0)|答案(1)|浏览(129)
Failed to fetch plugin https://github.com/katzer/cordova-plugin-background-mode.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
CordovaError: Error: npm: Command failed with exit code 1 Error output:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @awesome-cordova-plugins/in-app-purchase-2@5.37.1
npm ERR! Found: rxjs@6.6.7
npm ERR! node_modules/rxjs
npm ERR!   rxjs@"6.6.7" from @angular-devkit/architect@0.1201.4
npm ERR!   node_modules/@angular-devkit/architect
npm ERR!     @angular-devkit/architect@"0.1201.4" from @angular-devkit/build-angular@12.1.4
npm ERR!     node_modules/@angular-devkit/build-angular
npm ERR!       dev @angular-devkit/build-angular@"~12.1.1" from the root project
npm ERR!     @angular-devkit/architect@"0.1201.4" from @angular-devkit/build-webpack@0.1201.4
npm ERR!     node_modules/@angular-devkit/build-webpack
npm ERR!       @angular-devkit/build-webpack@"0.1201.4" from @angular-devkit/build-angular@12.1.4
npm ERR!       node_modules/@angular-devkit/build-angular
npm ERR!         dev @angular-devkit/build-angular@"~12.1.1" from the root project
npm ERR!     1 more (@angular/cli)
npm ERR!   rxjs@"6.6.7" from @angular-devkit/build-angular@12.1.4
npm ERR!   node_modules/@angular-devkit/build-angular
npm ERR!     dev @angular-devkit/build-angular@"~12.1.1" from the root project
npm ERR!   21 more (@angular-devkit/build-webpack, @angular-devkit/core, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^5.5.0 || ^7.3.0" from @awesome-cordova-plugins/in-app-purchase-2@5.37.1
npm ERR! node_modules/@awesome-cordova-plugins/in-app-purchase-2
npm ERR!   @awesome-cordova-plugins/in-app-purchase-2@"^5.37.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: rxjs@7.5.6
npm ERR! node_modules/rxjs
npm ERR!   peer rxjs@"^5.5.0 || ^7.3.0" from @awesome-cordova-plugins/in-app-purchase-2@5.37.1
npm ERR!   node_modules/@awesome-cordova-plugins/in-app-purchase-2
npm ERR!     @awesome-cordova-plugins/in-app-purchase-2@"^5.37.1" 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.
npm ERR!
npm ERR! See C:\Users\orgne\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\orgne\AppData\Local\npm-cache\_logs\2022-08-15T14_50_01_258Z-debug-0.log
dnph8jn4

dnph8jn41#

请尝试以下操作:

cordova plugin add https://github.com/yourplugin --nofetch

您可以在here的旧答案中查看更多信息

相关问题