transistorsoft / capacitor-background-fetch

Periodic callbacks in the background for both IOS and Android
78 stars 9 forks source link

bug: `peerDependency` uses outdated version #12

Closed robingenz closed 1 year ago

robingenz commented 1 year ago

Your Environment

   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 4.4.0
  @capacitor/core: 4.4.0
  @capacitor/android: 4.4.0
  @capacitor/ios: 4.4.0

Installed Dependencies:

  @capacitor/cli: 4.3.0
  @capacitor/core: 4.3.0
  @capacitor/android: 4.3.0
  @capacitor/ios: 4.3.0

[success] iOS looking great! 👌

Expected Behavior

I want to install this package with @capacitor/core@4.3.0 without error and npm i --force.

Actual Behavior

I get the following error when installing this package with @capacitor/core@4.3.0:

$ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @transistorsoft/capacitor-background-fetch@1.0.0
npm ERR! Found: @capacitor/core@4.3.0
npm ERR! node_modules/@capacitor/core
npm ERR!   @capacitor/core@"4.3.0" from the root project
npm ERR!   peer @capacitor/core@"^4.0.0" from @capacitor-community/sqlite@4.1.1
npm ERR!   node_modules/@capacitor-community/sqlite
npm ERR!     @capacitor-community/sqlite@"4.1.1" from the root project
npm ERR!   35 more (@capacitor-community/keep-awake, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @capacitor/core@"next" from @transistorsoft/capacitor-background-fetch@1.0.0
npm ERR! node_modules/@transistorsoft/capacitor-background-fetch
npm ERR!   @transistorsoft/capacitor-background-fetch@"1.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @capacitor/core@4.0.0-beta.2
npm ERR! node_modules/@capacitor/core
npm ERR!   peer @capacitor/core@"next" from @transistorsoft/capacitor-background-fetch@1.0.0
npm ERR!   node_modules/@transistorsoft/capacitor-background-fetch
npm ERR!     @transistorsoft/capacitor-background-fetch@"1.0.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.

The peer dependency should be for example:

"peerDependencies": {
-    "@capacitor/core": "next"
+    "@capacitor/core": "^4.0.0"
},

Example: https://github.com/ionic-team/capacitor-plugins/blob/4d007af1c6a652d9c460da40db409b089759d29c/app/package.json#L64

cschoenecker commented 1 year ago

Same issue for me : npm WARN @transistorsoft/capacitor-background-fetch@1.0.1 requires a peer of @capacitor/core@next but none is installed. You must install peer dependencies yourself.

And I had "@capacitor/core": "^4.4.0" installed

christocracy commented 1 year ago

Updated peerDependencies. Released to 1.0.2