Warnings at install Native Plugins

Hello!
How can I solve this issues or warnings that appear when I am installing a plugin.:

npm WARN @ionic-native/splash-screen@3.12.1 requires a peer of @ionic-native/core@^3.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/status-bar@3.12.1 requires a peer of @ionic-native/core@^3.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngx-translate/http-loader@2.0.0 requires a peer of @angular/core@>=4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngx-translate/http-loader@2.0.0 requires a peer of @angular/common@>=4.3.0 but none is installed. You must install peer dependencies yourself.

I have tried updating ionic and run npm install, but nothing help.
I know that is only a warning but I would like to know if it is a way to solve that warning.

Thanks.

The first package requires a specific or newer version of the second package per line.

Post your package.json to show what versions of these you have installed.

Hi @Sujan12, thanks for reply me.
This is my package.json:

{
    "name": "MyApp",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve",
        "extract": "ngx-translate-extract --input ./src --output ./src/assets/i18n/{en,es,ca,fr,it}.json --clean --sort --format namespaced-json"
    },
    "dependencies": {
        "@angular/common": "4.1.3",
        "@angular/compiler": "4.1.3",
        "@angular/compiler-cli": "4.1.3",
        "@angular/core": "4.1.3",
        "@angular/forms": "4.1.3",
        "@angular/http": "4.1.3",
        "@angular/platform-browser": "4.1.3",
        "@angular/platform-browser-dynamic": "4.1.3",
        "@ionic-native/core": "^4.3.0",
        "@ionic-native/splash-screen": "3.12.1",
        "@ionic-native/sqlite": "^4.3.0",
        "@ionic-native/status-bar": "3.12.1",
        "@ionic/storage": "2.0.1",
        "@ngx-translate/core": "^8.0.0",
        "@ngx-translate/http-loader": "^2.0.0",
        "cordova-android": "^6.2.3",
        "cordova-browser": "^4.1.0",
        "cordova-ios": "^4.4.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova-sqlite-storage": "^2.0.4",
        "ionic-angular": "3.6.1",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.12"
    },
    "devDependencies": {
        "@biesbjerg/ngx-translate-extract": "^2.3.2",
        "@ionic/app-scripts": "^2.1.4",
        "typescript": "2.3.4"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-console": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "cordova-sqlite-storage": {}
        },
        "platforms": [
            "android",
            "browser",
            "ios"
        ]
    }
}

update these to “^4.3.0” as well. Then run npm install.

Check which version of this worked with Angular 4.1.3 and set it to this version.

Thanks!! @Sujan12
You were on right, there were some dependencies outdated.

I found this solution for this:

“@ngx-translate/http-loader”: “^2.0.0”,
Check which version of this worked with Angular 4.1.3 and set it to this version.

It was this:

From: https://github.com/ngx-translate/core/issues/629
Use @ngx-translate/http-loader 0.1.0 or start using @angular/common/http instead of @angular/http. The last option however is only possible if you use Angular 4.3+

Due I had some outdated dependencies in my package.json and researching a little bit more on the web about your answer, I have found how to update it:

First, run this command: 
npm install npm-check-updates -g

To see what new versions are available:
ncu

To automatically updates to the latest packages:
ncu -u

With these commands, I’ve solved the warnings and at the same time update all my dependencies avoiding make some manuals changes.

2 Likes

BTW, this was recently fixed in the app base.

Hello,
I’m still getting these warnings when installing plugins. You commented that were fixed but I always update all the components when there is a new release, but these warning still showing.
I know that I write a solution, but seems that only works for the last time.

Thanks any help that you can give me.

The warnings:

npm WARN ionic-angular@3.7.1 requires a peer of @angular/common@4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN ionic-angular@3.7.1 requires a peer of @angular/compiler@4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN ionic-angular@3.7.1 requires a peer of @angular/compiler-cli@4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN ionic-angular@3.7.1 requires a peer of @angular/core@4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN ionic-angular@3.7.1 requires a peer of @angular/forms@4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN ionic-angular@3.7.1 requires a peer of @angular/http@4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN ionic-angular@3.7.1 requires a peer of @angular/platform-browser@4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN ionic-angular@3.7.1 requires a peer of @angular/platform-browser-dynamic@4.4.3 but none is installed. You must install peer dependencies yourself.
npm WARN ionic-angular@3.7.1 requires a peer of rxjs@5.4.3 but none is installed. You must install peer dependencies yourself.

My Ionic info:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.13.1
    ionic (Ionic CLI) : 3.13.2

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.7.1

System:

    Node  : v8.2.1
    npm   : 5.4.0
    OS    : macOS Sierra
    Xcode : Xcode 9.0.1 Build version 9A1004

Misc:

    backend : pro

My Package.json :

"dependencies": {
    "@angular/common": "4.4.6",
    "@angular/compiler": "4.4.6",
    "@angular/compiler-cli": "4.4.6",
    "@angular/core": "4.4.6",
    "@angular/forms": "4.4.6",
    "@angular/http": "4.4.6",
    "@angular/platform-browser": "4.4.6",
    "@angular/platform-browser-dynamic": "4.4.6",
    "@ionic-native/core": "^4.3.2",
    "@ionic-native/diagnostic": "^4.3.2",
    "@ionic-native/network": "^4.3.2",
    "@ionic-native/secure-storage": "^4.3.2",
    "@ionic-native/splash-screen": "^4.3.2",
    "@ionic-native/status-bar": "^4.3.2",
    "@ionic/storage": "^2.0.1",
    "@ngx-translate/core": "^8.0.0",
    "@ngx-translate/http-loader": "2.0.0",
    "cordova-android": "^6.3.0",
    "cordova-plugin-console": "^1.1.0",
    "cordova-plugin-device": "^1.1.6",
    "cordova-plugin-ionic": "^2.0.1",
    "cordova-plugin-network-information": "^1.3.3",
    "cordova-plugin-secure-storage": "^2.6.8",
    "cordova-plugin-splashscreen": "^4.0.3",
    "cordova-plugin-statusbar": "^2.2.3",
    "cordova-plugin-whitelist": "^1.3.2",
    "cordova-sqlite-storage": "^2.0.4",
    "cordova.plugins.diagnostic": "^3.7.1",
    "dexie": "^2.0.1",
    "ionic-angular": "3.7.1",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "moment": "^2.19.1",
    "rxjs": "5.5.0",
    "sw-toolbox": "3.6.0",
    "ts-md5": "^1.2.2",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@angular/cli": "^1.4.8",
    "@biesbjerg/ngx-translate-extract": "^2.3.2",
    "@ionic/app-scripts": "^3.0.1",
    "typescript": "2.5.3"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-console": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-whitelist": {},
      "ionic-plugin-keyboard": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-secure-storage": {},
      "cordova.plugins.diagnostic": {},
      "cordova-plugin-network-information": {}
    },
    "platforms": [
      "android"
    ]
  }
}

i have the same prob here while installing Cordova and Ionic Native plugins (firebase)

npm WARN @ionic/pro@2.0.3 requires a peer of cordova-plugin-ionic@^5.0.0 but none is installed. You must install peer dependencies yourself.
and i have no idea how to solve it :confused:

I have got the same issue… This is what i did:

npm install --save cordova-plugin-ionic-webview@^2.1.4
ionic cordova plugin add cordova-plugin-ionic --save --variable APP_ID="XXXXXXX" --variable CHANNEL_NAME="Channel"

but the error was still there… So i tried to force the installation:

ionic cordova plugin add cordova-plugin-ionic --save --variable APP_ID="XXXXXXX" --variable CHANNEL_NAME="Channel" --force

and i got this output that seems to be ok:

Plugin "cordova-plugin-ionic" already installed on android.
Installing "cordova-plugin-ionic" for ios
Plugin dependency "cordova-plugin-splashscreen@5.0.2" already fetched, using that version.
Dependent plugin "cordova-plugin-splashscreen" already installed on ios.
Plugin dependency "cordova-plugin-ionic-webview@2.1.0" already fetched, using that version.
Dependent plugin "cordova-plugin-ionic-webview" already installed on ios.
Plugin dependency "cordova-plugin-file@6.0.1" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on ios.
Plugin dependency "cordova-plugin-file-transfer@1.7.1" already fetched, using that version.
Dependent plugin "cordova-plugin-file-transfer" already installed on ios.
Adding cordova-plugin-ionic to package.json
Saved plugin info for "cordova-plugin-ionic" to config.xml

i fixed the problem i forgot to add the file google-services.json in my app, it fixed everything

wish I’d found this 3 days ago! ty.