I am getting an error when I try to run npm i --save ionic-native@latest:
ionic-hello-world@ /Applications/XAMPP/xamppfiles/htdocs/dev/_ionic/CameraProject
├── UNMET PEER DEPENDENCY @ionic-native/[email protected]
└── [email protected]
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
Is there something else I should be running to update it properly?
Hey @lorkel ,
I'm guessing you just created a new project. New projects now come with Ionic Native 3.x pre-installed. Looks like you have Ionic Native 3.1.1 pre-installed and you are trying to install Ionic Native 2.x.
Please read the updated documentation for instructions on using Ionic Native 3.x: http://ionicframework.com/docs/v2/native/
If you wish to use Ionic Native 2.x, then uninstall any packages that begin with @ionic-native/ and only keep ionic-native.
Hi @ihadeed , thanks for the response. I'm still getting warnings and I don't know how to resolve the issue.
I've tried npm uninstall @ionic-native/ and I'm still getting the same warning errors:
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
Then following the instructions on the link above: npm install @ionic-native/core --save I get the same errors as above. If I try npm uninstall @ionic-native/[email protected] I get the same errors.
Can you tell me what I need to uninstall to resolve these errors if I'm starting from a fresh project? I wasn't trying to install any specific version of ionic-native so I don't understand why there would be a discrepancy. Thank you!
Okay I've tried a few different things hoping to resolve the discrepancies. I've uninstalled ionic completely, cleared the cache, and reinstalled (via sudo, I get errors if I don't run sudo). Then per the documentation I've tried:
ionic start CameraProject2 blank --v2
cd CameraProject2
ionic platform add ios
npm install @ionic-native/core --save
npm install @ionic-native/camera --save
After installing @ionic-native/core it shows that it installs 3.1.0. When I try to run the camera it says:
ionic-hello-world@ /Applications/XAMPP/xamppfiles/htdocs/dev/_ionic/CameraProject2
├── @ionic-native/[email protected]
└── UNMET PEER DEPENDENCY @ionic-native/[email protected]
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
Then if I try to manually install @ionic-native/[email protected] I get the splash screen and status bar errors from above.
Okay, I see the issue. Our app base is fixing the version, which could keep it from updating it in some cases. @jthoms1 @jgw96 any ideas on making it easy to update but still have this work?
@lorkel
From what I see, you have @ionic-native/[email protected] installed and you're trying to install version 3.1.1 of the plugins. You need to make sure that you have the same version of core and the plugins to get rid of these warnings.
This will be fixed in the next release in a way that you don't have to update @ionic-native/core unless if you need to.
@ihadeed Per my second message, I tried to upgrade to @ionic-native/[email protected] but then got the following errors:
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
For anyone else needing help with this... if you just upgrade @ionic-native/core, @ionic-native/splash-screen and @ionic-native-status-bar manually up to @3.1.1 the errors go away.
@lorkel Just published 3.2.0 that solves this issue. You will no longer get these error messages unless the core package needs to be updated.
@ihadeed Last question - when I run npm update -g @ionic-native/ and then check the version I am getting 4.1.2, is that right? Or should I be updating a different package?
Sorry no ETA - I updated it locally and I get these errors now:
ionic-hello-world@ /Applications/XAMPP/xamppfiles/htdocs/dev/_ionic/CameraProject2
└── UNMET PEER DEPENDENCY @ionic-native/[email protected]
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/[email protected] but none was installed.
What I meant is your plugins have to be at least 3.2.0 so you don't experience these errors again, unless it's necessary.
Just run:
npm i --save @ionic-native/core @ionic-native/camera@latest @ionic-native/splash-screen@latest @ionic-native/status-bar@latest
Ahh great, okay thanks for the clarification!