Can't resolve peer dependencies after update

I updated ionic using:

npm install -g ionic cordova

And created a brand new project.

All seemed fine until I tried to add @ionic-native/network using:

npm install @ionic-native/network --save

This results in a message:

npm WARN @ionic-native/network@4.3.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.

So i did:

npm install @ionic-native/core@^4.2.0

Now I get:

npm WARN @ionic-native/splash-screen@3.12.1 requires a peer of @ionic-native/core@^3.6.0 but none was installed.

npm WARN @ionic-native/status-bar@3.12.1 requires a peer of @ionic-native/core@^3.6.0 but none was installed.

Using:

npm i

Reverts to the message:

npm WARN @ionic-native/network@4.3.0 requires a peer of @ionic-native/core@^4.2.0 but none was installed.

So it seems that there are conflicting dependencies on components I need. Can I safely ignore one or other of the warnings, if so which or is there some magic way to get both versions of @ionic-native/core at the same time for the relevant components?

If not, how do I find out which version of @ionic-native/network works with @ionic-native/core@^3.6.0?

Update all your @ionic-native things (including splash-screen) to at least 4.0, and then they will all be OK with the same version of core. You can always see the latest available versions of things with npm v package-name.

I have the same problem… but after update @ionic-native, ihave this result ├── @ionic-native/barcode-scanner@4.3.0
└── UNMET PEER DEPENDENCY @ionic-native/core@4.3.0

npm WARN @ionic-native/splash-screen@3.12.1 requires a peer of @ionic-native/core@^3.6.0 but none was installed.
npm WARN @ionic-native/status-bar@3.12.1 requires a peer of @ionic-native/core@^3.6.0 but none was installed.

Hi,

I have same problem with my ionic project since few days. I have try everything, re-install node, npm, ionic, Cordova. Always the same issues

I Have solution : edit file package.json
21 AM
and type: npm i

Thanks for the reply. It is somewhat disconcerting for people new to Ionic (like me) that a clean install/refresh does not result in a working setup. My interpretation of what you are saying is at this point some components are on version 3 and some on version 4. Presumably using the version 4 options for splash-screen etc means that we are using Beta code as they have not yet been updated to 4 on the “main” version installed with Ionic?

Perhaps you’re right. My current interpretation, however, is that the base app has stale dependencies. We’ll see what happens.

Thank you very much! this works for me.