2

I have a dependency issue in my @ionic/angular 7.1.1 project.

@ionic-native/core latest ver 5.36 appears to have a peer dependency on an rxjs version compatible with 5.5.0 or 6.5.0.

A screenshot of the NPM page for the ionic native core package's dependency file showing a peer dependency on rxjs compatible with version 5.5 or 6.5

I can't install this rxjs version because @ionic/angular 7.1.1 requires rxjs >= 7.5.0.

A screenshot of the NPM page for the ionic angular package's dependency file showing a peer dependency on rxjs greater than or equal to version 7.5.0

So how do I get around this?

Project Info:

Ionic CLI                     : 7.0.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework               : @ionic/angular 7.1.1
@angular-devkit/build-angular : 16.1.3
@angular-devkit/schematics    : 16.1.3
@angular/cli                  : 16.1.3
@ionic/angular-toolkit        : 9.0.0

Capacitor:

Capacitor CLI      : 5.1.0
@capacitor/android : not installed
@capacitor/core    : 5.1.0
@capacitor/ios     : not installed

Utility:

cordova-res (update available: 0.15.4) : 0.15.2
native-run (update available: 1.7.3)   : 1.7.2

System:

NodeJS : v18.14.0 (/usr/local/bin/node)
npm    : 9.3.1
OS     : macOS Catalina

Error:

npm i @ionic-native/native-page-transitions
   
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/rxjs
npm ERR!   rxjs@"^7.8.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^5.5.0 || ^6.5.0" from @ionic-native/[email protected]
npm ERR! node_modules/@ionic-native/core
npm ERR!   @ionic-native/core@"^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

I tried adding backward compatibility for modules with dependencies of rxjs versions up to 6.6.7, in my package.json:

"rxjs": "^7.8.1",
"rxjs-compat": "^6.6.7",

Then I deleted my node_modules folder, package-lock.json file, and ran npm install but I still had issues.

@ionic-native/core and @ionic-native/native-page-transitions are both latest versions 5.36 and they require rxjs 5.5.0 or 6.5.0, so not sure why rxjs-compact 6.6.7 doesn't provide backward compatibility needed.

4
  • 2
    I made a couple edits to make clear that you're dealing with @ionic/angular version 7.1.1. which is much different from dealing with @angular/core version 7.1.1 (which is nearly half a decade old). Commented Sep 26, 2023 at 13:58
  • 1
    I don't have an answer for you, but good luck! Commented Sep 26, 2023 at 13:58
  • 1
    Thanks, there seems to be a move a way from ionic-native for Cordova plug-ins in capacitor apps and using @awesome-corodva-plugins instead, the answer might in there -I’ll take a look for the latter equivalents of ionic-native page transition plugins , see ionic.io/blog/a-new-chapter-for-ionic-native Commented Sep 27, 2023 at 13:01
  • 1
    Docs for anyone else with similar issues : github.com/danielsogl/awesome-cordova-plugins Commented Sep 27, 2023 at 13:05

2 Answers 2

6

As of ~ September 27, 2021 all Cordova plugins were moved to a community maintainer. You will need to move all @ionic-native/* packages to their new package name: @awesome-cordova-plugins/*.

npm install cordova-plugin-name
npm install @awesome-cordova-plugins/name

Awesome Cordova plugin list

Sign up to request clarification or add additional context in comments.

Comments

1

I had the same issue during upgrading Ionic and Angular, I removed all @ionic-native packages and installed @awesome-cordova-plugins you can find all plugins here https://github.com/danielsogl/awesome-cordova-plugins/tree/master/docs/plugins

1 Comment

This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From Review

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.