Ionic-native: @ionic-native/[email protected] requires a peer of @ionic-native/core@^3.6.0 but none is installed [@ionic-native/[email protected] is installed]

Created on 2 Jan 2018  路  6Comments  路  Source: ionic-team/ionic-native

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://ionicworldwide.herokuapp.com/

Current behavior:

Hi, i keep getting "Application error, the connection to the server was unsuccessful (http://192.168.1.13:8100)" But if i don't click on ok, i can see that app is launched behind the alert. So i decide to pay attention to any console log to get a clue.

I notice that there is an inconsistency in my plugins dependencies. When i run npm commands, i have a Warn saying the following
@ionic-native/[email protected] requires a peer of @ionic-native/core@^3.6.0 but none is installed
But i have @ionic-native/[email protected] installed

i uninstall both packages, clear npm cache with npm cache clear --force reinstall them again
clear the cache again, but no luck.

Expected behavior:

There should not be dependency error using @ionic-native/[email protected] and @ionic-native/[email protected] saying that @ionic-native/[email protected] requires a peer of @ionic-native/core@^3.6.0 but none is installed

Steps to reproduce:

Create a new ionic project with blank template, install @ionic-native/transfer try to install something else with npm and see the CLI log
Related code:

insert any relevant code here

Other information:

I also notice that the following error occur application error the connection to the server was unsuccessful when i uninstall the @ionic/cli-cordova-plugin package as the ionic cordova run command states that it is no longer necessary . To be honest i have regrets. it could not be so heavy
here is my package.json content

 "name": "my-app",
    "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"
    },
    "dependencies": {
        "@angular/common": "5.0.3",
        "@angular/compiler": "5.0.3",
        "@angular/compiler-cli": "5.0.3",
        "@angular/core": "5.0.3",
        "@angular/forms": "5.0.3",
        "@angular/http": "5.0.3",
        "@angular/platform-browser": "5.0.3",
        "@angular/platform-browser-dynamic": "5.0.3",
        "@ionic-native/admob-free": "^4.5.2",
        "@ionic-native/camera": "^4.5.2",
        "@ionic-native/core": "^4.5.2",
        "@ionic-native/crop": "^4.5.2",
        "@ionic-native/facebook": "^4.5.2",
        "@ionic-native/file": "^4.5.2",
        "@ionic-native/file-path": "^4.5.2",
        "@ionic-native/file-transfer": "^4.5.2",
        "@ionic-native/local-notifications": "^4.5.2",
        "@ionic-native/media": "^4.5.2",
        "@ionic-native/native-audio": "^4.5.2",
        "@ionic-native/native-storage": "^4.5.2",
        "@ionic-native/network": "^4.5.2",
        "@ionic-native/splash-screen": "4.4.0",
        "@ionic-native/status-bar": "^4.5.2",
        "@ionic-native/transfer": "^3.14.0",
        "@ionic-native/twitter-connect": "^4.5.2",
        "@ionic/pro": "1.0.16",
        "@ionic/storage": "2.1.3",
        "@ngx-translate/core": "^9.0.2",
        "@ngx-translate/http-loader": "^2.0.0",
        "cordova-admob-sdk": "^0.13.1",
        "cordova-android": "^6.4.0",
        "cordova-android-play-services-gradle-release": "^1.1.4",
        "cordova-plugin-admob-free": "^0.13.0",
        "cordova-plugin-badge": "^0.8.5",
        "cordova-plugin-camera": "^3.0.0",
        "cordova-plugin-crop": "^0.4.0",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-facebook4": "^1.9.1",
        "cordova-plugin-file": "^5.0.0",
        "cordova-plugin-file-transfer": "^1.7.0",
        "cordova-plugin-filepath": "^1.1.0",
        "cordova-plugin-ionic-webview": "^1.1.11",
        "cordova-plugin-local-notification": "^0.9.0-beta.1",
        "cordova-plugin-media": "^4.0.0",
        "cordova-plugin-nativeaudio": "^3.0.9",
        "cordova-plugin-nativestorage": "^2.2.2",
        "cordova-plugin-network-information": "^1.3.4",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.3.0",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova-promise-polyfill": "0.0.2",
        "ionic": "^3.19.0",
        "ionic-angular": "3.9.2",
        "ionic-audio": "^3.2.0",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "moment": "^2.18.1",
        "rxjs": "5.5.2",
        "sw-toolbox": "3.6.0",
        "twitter-connect-plugin": "^0.6.0",
        "zone.js": "0.8.18"
    },
    "devDependencies": {
        "@ionic/app-scripts": "3.1.7",
        "typescript": "2.4.2"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-device": {},
            "cordova-plugin-ionic-webview": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "cordova-android-play-services-gradle-release": {
                "PLAY_SERVICES_VERSION": "11.+"
            },
            "cordova-plugin-statusbar": {},
            "cordova-plugin-network-information": {},
            "cordova-plugin-local-notification": {},
            "cordova-plugin-nativestorage": {},
            "twitter-connect-plugin": {
                "FABRIC_KEY": "12ko8gh"
            },
            "cordova-admob-sdk": {},
            "cordova-plugin-admob-free": {},
            "cordova-plugin-file-transfer": {},
            "cordova-plugin-camera": {},
            "cordova-plugin-file": {},
            "cordova-plugin-filepath": {},
            "cordova-plugin-crop": {},
            "cordova-plugin-media": {},
            "cordova-plugin-nativeaudio": {},
            "cordova-plugin-facebook4": {
                "APP_ID": "123",
                "APP_NAME": "FacebookApp"
            }
        },
        "platforms": [
            "android"
        ]
    }

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

insert the output from ionic info here
@ionic/cli-utils: 1.19.0
ionic (Ionic CLI) : 3.19.0
@ionic/app-scripts: 3.1.7
Cordova Platforms : none
Ionic Framework : ionic-angular 3.9.2
Android SDK Tools : 25.2.5
Node                      : v8.9.3
npm                        : 5.5.1
OS                           : Windows 10
Misc:
 backend : pro

Thanks

Most helpful comment

Try to cleanly reinstall your libs

rm -r node_modules
rm package-lock.json
npm install

All 6 comments

Try to cleanly reinstall your libs

rm -r node_modules
rm package-lock.json
npm install

I have the same issue, and already have "@ionic-native/core": "4.4.0"
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/core@^3.6.0 but none was installed.
Reinstalling the libs as above changed nothing

If you get a warning saying that the plugin requires a higher version of @ionic-native/core, then you should update all your plugins (including the core package) to the same (or latest) version. We update the peer dependency of @ionic-native/core when there's a required update in that package.

This does not solve the problem, @ionic-native/core has versions 4 and above published, while @ionic-native/transfer end in 3.14.0, which is causing this incompatibility. Any chances to publish a newer compatible version of @ionic-native/transfer?

I have the same problem. It looks like the only "solution" is to roll back to older versions of all packages, so that we can use an older version of @ionic-native/core. Definitely not a comforting strategy.

@andrefa @bradleyDean the package has been renamed to @ionic-native/file-transfer

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sabariferin picture sabariferin  路  4Comments

ghost picture ghost  路  3Comments

hobbydevs picture hobbydevs  路  3Comments

shaliko picture shaliko  路  3Comments

kyleap picture kyleap  路  4Comments