perfood / capacitor-healthkit

Capacitor plugin to interact with HealthKit
https://www.npmjs.com/package/@perfood/capacitor-healthkit
54 stars 41 forks source link

capacitor/core conflict with Ionic CLI 7 #23

Open bnemani opened 1 year ago

bnemani commented 1 year ago

I am getting capacitor/core conflict with latest version of this plugin:

following is the error:

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: looph@0.0.1 npm ERR! Found: @capacitor/core@5.0.3 npm ERR! node_modules/@capacitor/core npm ERR! @capacitor/core@"5.0.3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @capacitor/core@"^4.0.0" from @perfood/capacitor-healthkit@1.3.0 npm ERR! node_modules/@perfood/capacitor-healthkit npm ERR! @perfood/capacitor-healthkit@"*" 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.

my ionic env:

Ionic:

Ionic CLI : 7.1.1 (/Users/bhanu/.nvm/versions/node/v16.16.0/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 7.0.7 @angular-devkit/build-angular : 16.0.2 @angular-devkit/schematics : 16.0.2 @angular/cli : 16.0.2 @ionic/angular-toolkit : 9.0.0

Capacitor:

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

Utility:

cordova-res : not installed globally native-run : 1.7.2

System:

NodeJS : v16.16.0 (/Users/bhanu/.nvm/versions/node/v16.16.0/bin/node) npm : 9.6.5 OS : macOS Monterey

mahnuh commented 1 year ago

Hi @bnemani, Capacitor 5 support will be coming in the next weeks. For the time being, did you try to use --legacy-peer-deps when running npm install?

adamrz commented 11 months ago

Is Capacitor 5 support still coming?

mahnuh commented 10 months ago

I starte working on a major update, but due to other responsibilities I do not have a timeline yet. Does --legacy-peer-deps do the trick for now?

fitnexus commented 8 months ago

any update on the capacitor 5 compatibility?

mahnuh commented 8 months ago

@fitnexus does this help? Otherwise we are working on v2 of this plugin which will be a major release with a lot of breaking changes. Please check out the v2 branch.

binxiaosyd commented 7 months ago

@mahnuh I got same dependency issue for Capacitor v5. I tried --legacy-peer-deps. It works without error locally, but we have to add that to all environments pipeline and any npm i for local in the future, so not ideal. I have tried to update the depended packages to latest version, and tested a few fns in my iPhone without issue. I have created a PR for it.

I also tried v2 branch, but got error for fn getAuthorizationStatus which asks for parameter sampleType, but iOS asks for sampleName. I forgot the exact error message. I am also interested how can it know if the status is notDetermined or sharingDenied as I got same empty resultData array in v1 queryHKitSampleType for both statuses.

Nicolas22930 commented 6 months ago

hey there any news? :)