AppsFlyerSDK / appsflyer-capacitor-plugin

AppsFlyer SDK plugin for Capacitor
MIT License
15 stars 26 forks source link

Conflicting peer dependency on install #28

Closed brad426 closed 2 years ago

brad426 commented 2 years ago

When running npm install appsflyer-capacitor-plugin i get the following errors:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: capacitor-app@1.0.0
npm ERR! Found: @capacitor/core@4.0.1
npm ERR! node_modules/@capacitor/core
npm ERR!   peer @capacitor/core@"^4.0.0" from @capacitor/android@4.0.1
npm ERR!   node_modules/@capacitor/android
npm ERR!     @capacitor/android@"^4.0.1" from the root project
npm ERR!   peer @capacitor/core@"^4.0.0" from @capacitor/camera@4.0.1
npm ERR!   node_modules/@capacitor/camera
npm ERR!     @capacitor/camera@"latest" from the root project
npm ERR!   4 more (@capacitor/geolocation, @capacitor/ios, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! appsflyer-capacitor-plugin@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @capacitor/core@3.7.0
npm ERR! node_modules/@capacitor/core
npm ERR!   peer @capacitor/core@"^3.0.0" from appsflyer-capacitor-plugin@6.8.0
npm ERR!   node_modules/appsflyer-capacitor-plugin
npm ERR!     appsflyer-capacitor-plugin@"*" 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 /Users/brad/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/brad/.npm/_logs/2022-08-02T13_57_41_411Z-debug-0.log
pazlavi commented 2 years ago

Hi @brad426 Thank you for reaching out to us.

This plugin is still targeting Capacitor V3. To solve your installation error, please run npm install --force.

Another solution is to override our plugin dependencies and use the same versions used in your app. To achieve this, please add the following block to your package.json file

  "overrides": {
    "appsflyer-capacitor-plugin": {
      "@capacitor/android": "$@capacitor/android",
      "@capacitor/core": "$@capacitor/core",
      "@capacitor/ios": "$@capacitor/ios"
    }
 }
brad426 commented 2 years ago

great. thank you very much