# Multiple erreur when I launch the command to install or remove a package in Ionic

**URL:** <https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732>\
**Category:** Ionic Angular\
**Created:** [November 18, 2022, 4:04pm UTC](https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732 "2022-11-18T16:04:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Loiic](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/loiic/32/140770_2.png) [@Loiic](https://forum.ionicframework.com/u/Loiic)\
**Post date:** [November 18, 2022, 4:04pm UTC](https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732/1 "2022-11-18T16:04:07Z")

</div>

Hello,

I encounter issues when I try to install or uninstall a package using NPM.

For example, when I launch the command `npm uninstall @awesome-cordova-plugins/barcode-scanner`, I get the kind of warning/errors indicated in the list below.

I am not sure to know the better way to correctly fix this problem. Could someone help me with this?

_Thanks for your help,_  
_Loïc_

* * *

The errors:

```auto

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @awesome-cordova-plugins/barcode-scanner@5.37.1
npm WARN Found: @awesome-cordova-plugins/core@6.2.0
npm WARN node_modules/@awesome-cordova-plugins/core
npm WARN peer @awesome-cordova-plugins/core@"^6.0.1" from @awesome-cordova-plugins/camera@6.2.0
npm WARN node_modules/@awesome-cordova-plugins/camera
npm WARN @awesome-cordova-plugins/camera@"^6.2.0" from the root project
npm WARN 2 more (@awesome-cordova-plugins/device-orientation, the root project)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @awesome-cordova-plugins/core@"^5.1.0" from @awesome-cordova-plugins/barcode-scanner@5.37.1
npm WARN node_modules/@awesome-cordova-plugins/barcode-scanner
npm WARN 
npm WARN Conflicting peer dependency: @awesome-cordova-plugins/core@5.46.0
npm WARN node_modules/@awesome-cordova-plugins/core
npm WARN peer @awesome-cordova-plugins/core@"^5.1.0" from @awesome-cordova-plugins/barcode-scanner@5.37.1
npm WARN node_modules/@awesome-cordova-plugins/barcode-scanner
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @awesome-cordova-plugins/barcode-scanner@5.37.1
npm WARN Found: rxjs@6.6.7
npm WARN node_modules/rxjs
npm WARN rxjs@"6.6.7" from @angular-devkit/architect@0.1202.13
npm WARN node_modules/@angular-devkit/architect
npm WARN dev @angular-devkit/architect@"^0.1202.13" from the root project
npm WARN 48 more (@angular-devkit/core, @angular-devkit/build-angular, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer rxjs@"^5.5.0 || ^7.3.0" from @awesome-cordova-plugins/barcode-scanner@5.37.1
npm WARN node_modules/@awesome-cordova-plugins/barcode-scanner
npm WARN 
npm WARN Conflicting peer dependency: rxjs@7.5.7
npm WARN node_modules/rxjs
npm WARN peer rxjs@"^5.5.0 || ^7.3.0" from @awesome-cordova-plugins/barcode-scanner@5.37.1
npm WARN node_modules/@awesome-cordova-plugins/barcode-scanner
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @ngrx/effects@14.3.2
npm ERR! Found: @angular/core@12.2.14
npm ERR! node_modules/@angular/core
npm ERR! peer @angular/core@"12.2.14" from @angular/animations@12.2.14
npm ERR! node_modules/@angular/animations
npm ERR! peerOptional @angular/animations@"12.2.14" from @angular/platform-browser@12.2.14
npm ERR! node_modules/@angular/platform-browser
npm ERR! peer @angular/platform-browser@"12.2.14" from @angular/forms@12.2.14
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@">=8.2.7" from @ionic/angular@5.9.2
npm ERR! node_modules/@ionic/angular
npm ERR! 1 more (the root project)
npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project)
npm ERR! @angular/animations@"^12.2.14" from the root project
npm ERR! peer @angular/core@"12.2.14" from @angular/common@12.2.14
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"12.2.14" from @angular/forms@12.2.14
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@">=8.2.7" from @ionic/angular@5.9.2
npm ERR! node_modules/@ionic/angular
npm ERR! @ionic/angular@"^5.9.1" from the root project
npm ERR! 1 more (the root project)
npm ERR! peer @angular/common@"12.2.14" from @angular/platform-browser@12.2.14
npm ERR! node_modules/@angular/platform-browser
npm ERR! peer @angular/platform-browser@"12.2.14" from @angular/forms@12.2.14
npm ERR! node_modules/@angular/forms
npm ERR! peer @angular/forms@">=8.2.7" from @ionic/angular@5.9.2
npm ERR! node_modules/@ionic/angular
npm ERR! 1 more (the root project)
npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project)
npm ERR! 6 more (@angular/platform-browser-dynamic, @angular/router, ...)
npm ERR! 9 more (@angular/forms, @angular/platform-browser, ...)

```

---

<div class="post-metadata">

**Author:** ![julio-ionic](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@julio-ionic](https://forum.ionicframework.com/u/julio-ionic)\
**Post date:** [November 18, 2022, 4:13pm UTC](https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732/2 "2022-11-18T16:13:58Z")

</div>

All the @awesome-cordova-plugins package versions should match, looks like you have 6.x on some of them but you are trying to install @awesome-cordova-plugins/barcode-scanner 5.x.  
Try installing latest @awesome-cordova-plugins/barcode-scanner.

An alternative is to install with `--force` param so it ignores peer dependency problems, but could cause other issues.

---

<div class="post-metadata">

**Author:** ![Loiic](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/loiic/32/140770_2.png) [@Loiic](https://forum.ionicframework.com/u/Loiic)\
**Post date:** [November 18, 2022, 4:32pm UTC](https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732/3 "2022-11-18T16:32:27Z")

</div>

Hello @julio-ionic,

Thanks for your reply!

I actually try to build a new version of my app in Android Studio but I need to use the compileSdkVersion 31 instead of 30.

With the version 30, it works fine but with the version 31, I get a build erreur with the manifest file of the package “capacitor-cordova-android-plugins”. The only library used with this package is the “barcodescanner”.

I have seen that the package “phonegap-plugin-barcodescanner” [was archived](https://github.com/phonegap/phonegap-plugin-barcodescanner) and so, I suppose I have to switch to another tool and delete this one.

I just tried to update to the latest version of this package but the error is still presents when I try to build in Android Studio 😕

---

<div class="post-metadata">

**Author:** ![julio-ionic](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@julio-ionic](https://forum.ionicframework.com/u/julio-ionic)\
**Post date:** [November 18, 2022, 4:49pm UTC](https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732/4 "2022-11-18T16:49:47Z")

</div>

@awesome-cordova-plugins packages are just wrappers around existing cordova plugins with types for easier use in Angular projects, so always install latest version of them or the version you need to match other @awesome-cordova-plugins packages you have installed. The @awesome-cordova-plugins versions are independent from the actual cordova plugins they wrap.

Your problem is with `phonegap-plugin-barcodescanner` ([GitHub - phonegap/phonegap-plugin-barcodescanner: cross-platform BarcodeScanner for Cordova / PhoneGap](https://github.com/phonegap/phonegap-plugin-barcodescanner)).  
As you said, it’s archived, and latest release was 4 years ago, so it doesn’t support SDK 31+ because it didn’t exist when the latest release was done and it requires changes to support it.

---

<div class="post-metadata">

**Author:** ![Loiic](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/loiic/32/140770_2.png) [@Loiic](https://forum.ionicframework.com/u/Loiic)\
**Post date:** [November 18, 2022, 4:55pm UTC](https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732/5 "2022-11-18T16:55:13Z")

</div>

Thanks for the precisions.

So it is better to uninstall this package and switch to another plugin such as [the Capacitor package](https://www.npmjs.com/package/@capacitor-community/barcode-scanner) or is there any solution with the package @ionic-native/barcode-scanner?

---

<div class="post-metadata">

**Author:** ![julio-ionic](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@julio-ionic](https://forum.ionicframework.com/u/julio-ionic)\
**Post date:** [November 18, 2022, 5:22pm UTC](https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732/6 "2022-11-18T17:22:16Z")

</div>

@ionic-native is just the previous name of @awesome-cordova-plugins, still a plugin wrapper, and installing that will probably conflict with the @awesome-cordova-plugins.

By checking the phonegap-barcodescanner [network tab](https://github.com/phonegap/phonegap-plugin-barcodescanner/network) on GitHub you can see forks and when they were updated  
this one was updated today changing the `compile` to `implementation`, which is one of the problems that need to be solved, in this case to work with gradle 7

> **[GitHub - iamrakesh/phonegap-plugin-barcodescanner: cross-platform...](https://github.com/iamrakesh/phonegap-plugin-barcodescanner)**
>
> cross-platform BarcodeScanner for Cordova / PhoneGap - GitHub - iamrakesh/phonegap-plugin-barcodescanner: cross-platform BarcodeScanner for Cordova / PhoneGap

Then this other fork updated 2 days ago made changes to support SDK 31

> **[GitHub - 4sh/phonegap-plugin-barcodescanner at android-sdk31-compat](https://github.com/4sh/phonegap-plugin-barcodescanner/tree/android-sdk31-compat)**
>
> android-sdk31-compat

So you can combine both changes in your own fork and use your fork, or keep searching among the forks until you find one with all the fixes, or switch to the capacitor plugin if it has all the features you need

---

<div class="post-metadata">

**Author:** ![Loiic](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/loiic/32/140770_2.png) [@Loiic](https://forum.ionicframework.com/u/Loiic)\
**Post date:** [November 18, 2022, 5:26pm UTC](https://forum.ionicframework.com/t/multiple-erreur-when-i-launch-the-command-to-install-or-remove-a-package-in-ionic/228732/7 "2022-11-18T17:26:02Z")

</div>

Ok, many thanks for your explanations!

I will try to fix the issue and test the plugins before switching to another tool.

Thanks again for your help 🙂

_Regards,_  
_Loïc_
