Can't install any capacitor plugins

When I try to install nearly any capacitor plugin I get this error seem’s I cant install any plugin to my capacitor 7 app unless I use --force upon installing :

 npm install @capacitor/filesystem
>>
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @capacitor/app@6.0.2
npm error Found: @capacitor/core@7.0.1
npm error node_modules/@capacitor/core
npm error   peer @capacitor/core@"^7.0.0" from @capacitor/android@7.0.1
npm error   node_modules/@capacitor/android
npm error     @capacitor/android@"^7.0.1" from the root project
npm error   peer @capacitor/core@"^7.0.0" from @capacitor/ios@7.0.1
npm error   node_modules/@capacitor/ios
npm error     @capacitor/ios@"^7.0.1" from the root project
npm error   2 more (the root project, @capacitor/filesystem)
npm error
npm error Could not resolve dependency:
npm error peer @capacitor/core@"^6.0.0" from @capacitor/app@6.0.2
npm error node_modules/@capacitor/app
npm error   @capacitor/app@"^6.0.2" from the root project
npm error
npm error Conflicting peer dependency: @capacitor/core@6.2.0
npm error node_modules/@capacitor/core
npm error   peer @capacitor/core@"^6.0.0" from @capacitor/app@6.0.2
npm error   node_modules/@capacitor/app
npm error     @capacitor/app@"^6.0.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\LiliBerry\AppData\Local\npm-cache\_logs\2025-01-22T05_17_34_344Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\LiliBerry\AppData\Local\npm-cache\_logs\2025-01-22T05_17_34_344Z-debug-0.log```

Looks like you have Capacitor 6 dependencies installed, to use Capacitor 7 you have to update all the dependencies to 7.x

Follow the upgrade guide

1 Like