Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

382
Visualizações
Missing dependencies, unmet peer dependency in Ionic 2

I just wanted to add background geolocation to my Ionic 2 app running:

 npm install --save @ionic-native/background-geolocation

I get the error:

> ├── @ionic-native/background-geolocation@3.5.0  ├── UNMET PEER
> DEPENDENCY @ionic-native/core@^3.1.0 └── UNMET PEER DEPENDENCY
> rxjs@5.0.0-beta.12
> 
> npm WARN @ionic-native/background-geolocation@3.5.0 requires a peer of
> @ionic-native/core@^3.1.0 but none was installed. npm WARN
> @ionic-native/background-geolocation@3.5.0 requires a peer of
> rxjs@^5.0.1 but none was installed.

My package.json looks like this:

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic-native/background-geolocation": "^3.5.0",
    "@ionic-native/core": "^3.5.0",
    "@ionic/cloud-angular": "^0.11.0",
    "@ionic/storage": "1.1.7",
    "ionic-angular": "2.0.1",
    "ionic-native": "2.4.1",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.0.0",
    "typescript": "2.0.9"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [
    "ios",
    {
      "platform": "ios",
      "version": "",
      "locator": "ios"
    }
  ],
  "description": "App2: An Ionic project"
}

How can I fix this?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Peer dependency is a warning only, it wont break your build, the peer dependencies you need are @ionic-native/core@^3.1.0 and rxjs@^5.0.1

I see you have "rxjs": "5.0.0-beta.12" change it to "rxjs": "^5.0.1"

as for @ionic-native/core i see you have "@ionic-native/core": "^3.5.0" and its a later version that the peer dependency needs.. probably would be fine as is.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda