capacitor-community / barcode-scanner

A fast and efficient (QR) barcode scanner for Capacitor
MIT License
439 stars 173 forks source link

Update to @capacitor/core@"^5.0.0 #240

Closed NeluQi closed 1 year ago

NeluQi commented 1 year ago

npm ERR! Found: @capacitor-community/barcode-scanner@3.0.3 npm ERR! node_modules/@capacitor-community/barcode-scanner npm ERR! @capacitor-community/barcode-scanner@"^4.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! @capacitor-community/barcode-scanner@"^4.0.1" from the root project npm ERR! npm ERR! Conflicting peer dependency: @capacitor/core@5.0.3 npm ERR! node_modules/@capacitor/core npm ERR! peer @capacitor/core@"^5.0.0" from @capacitor-community/barcode-scanner@4.0.1 npm ERR! node_modules/@capacitor-community/barcode-scanner npm ERR! @capacitor-community/barcode-scanner@"^4.0.1" 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.

thegnuu commented 1 year ago

Just posting an error message without any context except the title is not ideal. Anyways as you can see in your message it is trying to load multiple versions of the plugin. Since I have no idea what your project looks like or what commands you are trying to run, I am not really able to help you.

For me, it looks like your package.json/package-lock.json is containing a mix of different plugin versions or somehow your node_modules got into a broken state.

Since this is an npm related issue I am pretty sure it has nothing to do with the plugin itself, the issue is most likely somewhere in your configuration...

jcesarmobile commented 1 year ago

looks like you already have the version 3 installed, try uninstalling it first and then install latest

npm uninstall @capacitor-community/barcode-scanner
npm install @capacitor-community/barcode-scanner@latest