ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.24k stars 955 forks source link

[Bug]: capacitor/live-updates@0.1.3 conflicts with capacitor/core@6.0.0 #7415

Closed songxychn closed 3 weeks ago

songxychn commented 4 weeks ago

Capacitor Version

Latest Dependencies:

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

Installed Dependencies:

@capacitor/ios: not installed @capacitor/cli: 6.0.0 @capacitor/core: 6.0.0 @capacitor/android: 6.0.0

Other API Details

npm --version
10.5.0

node --version
v20.12.2

Platforms Affected

Current Behavior

cannot install capacitor/live-updates because it requires capacitor/core@"^5.0.0". error logs:

npm install @capacitor/live-updates        

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: education-android@0.0.1
npm ERR! Found: @capacitor/core@6.0.0
npm ERR! node_modules/@capacitor/core
npm ERR!   @capacitor/core@"6.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @capacitor/core@"^5.0.0" from @capacitor/live-updates@0.1.3
npm ERR! node_modules/@capacitor/live-updates
npm ERR!   @capacitor/live-updates@"*" 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.

Expected Behavior

install capacitor/live-updates correctly

Project Reproduction

https://github.com/songxychn/live-update-bug-reproduce

Additional Information

No response

Vasile-Peste commented 3 weeks ago

I confirm we also encountered the same issue. Is it safe to force the installation anyway?

songxychn commented 3 weeks ago

I confirm we also encountered the same issue. Is it safe to force the installation anyway?

i tried. force install could finish. but the error jumped out again when i built apk in appflow

songxychn commented 3 weeks ago

it seems that the capacitor/live-updates doesn't catch up with the newly released capacitor/core@6.0.0. it needs a new release

krisshna666 commented 3 weeks ago

What if you downgrade the @capacitor/core version? Does it work well in appflow along with live-updates?

songxychn commented 3 weeks ago

What if you downgrade the @capacitor/core version? Does it work well in appflow along with live-updates?

i think downgrading can be a solution as it used to work. but i think we should look forward, not backward (if it is not an emergency situation). so i open this issue hoping the team will notice it and publish new live-updates.

krisshna666 commented 3 weeks ago

What if you downgrade the @capacitor/core version? Does it work well in appflow along with live-updates?

i think downgrading can be a solution as it used to work. but i think we should look forward, not backward (if it is not an emergency situation). so i open this issue hoping the team will notice it and publish new live-updates.

I tried downgrading the capacitor/core version below 5.0.0. But still producing the same conflicting result. I need to somehow do this for now.

jcesarmobile commented 3 weeks ago

This is not a Capacitor issue, if you have problems with live updates you should contact support.

You can use a custom install command in appflow to prevent the peer dependency issues by configuring the dependencyInstallCommand to use --force https://ionic.io/docs/appflow/cookbook/appflow-config

You can also add legacy-peer-deps=true to a .npmrc file.