Hi
I am trying to install globalization plugin to access .getPreferredLanguage() in my ionic 2 app, but I get this UNMET DEPENDENCY error.
$ ionic plugin add cordova-plugin-globalization --savePlugin "cordova-plugin-globalization" already installed on android.
Plugin "cordova-plugin-globalization" already installed on ios.
Saved plugin info for "cordova-plugin-globalization" to config.xml
$ npm install --save @ionic-native/[email protected] /home/louisro/Documents/mobileApps/BoardLine/ionic_version
├── UNMET PEER DEPENDENCY @angular/core@*
├── UNMET PEER DEPENDENCY @ionic-native/core@^3.1.0
├── @ionic-native/[email protected]
└── UNMET PEER DEPENDENCY rxjs@^5.0.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/core@^3.1.0 but none was installed.
npm WARN @ionic-native/[email protected] requires a peer of @angular/core@* but none was installed.
npm WARN @ionic-native/[email protected] requires a peer of rxjs@^5.0.1 but none was installed.
npm WARN @ionic/[email protected] requires a peer of @angular/core@>=2.0.0-rc.0 <2.0.0-rc.5 but none was installed.
npm WARN @ionic/[email protected] requires a peer of rxjs@>=5.0.0-beta.0 but none was installed.
$ ionic info
Your system information:
Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v7.4.0
Xcode version: Not installed
here my package.json:
{
"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.4.8",
"@angular/compiler": "2.4.8",
"@angular/compiler-cli": "2.4.8",
"@angular/core": "2.4.8",
"@angular/forms": "2.4.8",
"@angular/http": "2.4.8",
"@angular/platform-browser": "2.4.8",
"@angular/platform-browser-dynamic": "2.4.8",
"@angular/platform-server": "2.4.8",
"@ionic-native/app-version": "^3.4.4",
"@ionic-native/core": "^3.4.1",
"@ionic-native/device": "^3.4.1",
"@ionic-native/geolocation": "^3.4.4",
"@ionic-native/google-analytics": "^3.4.4",
"@ionic-native/keyboard": "^3.4.4",
"@ionic-native/onesignal": "^3.4.4",
"@ionic-native/splash-screen": "^3.4.4",
"@ionic-native/status-bar": "^3.4.4",
"@ionic/storage": "^2.0.0",
"@types/pouchdb": "5.4.28",
"angular-2-local-storage": "^1.0.1",
"ionic-angular": "2.2.0",
"ionic-native": "2.8.1",
"ionicons": "3.0.0",
"lodash": "^4.17.4",
"ng2-translate": "^5.0.0",
"pouchdb": "^6.1.2",
"rxjs": "5.0.1",
"sw-toolbox": "3.4.0",
"zone.js": "0.7.2"
},
"devDependencies": {
"@ionic/app-scripts": "^1.1.4",
"@types/cordova": "0.0.34",
"@types/cordova-ionic": "0.0.29",
"@types/node": "^7.0.12",
"typescript": "2.0.9"
},
"cordovaPlugins": [
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard",
"cordova-plugin-whitelist",
"cordova-plugin-console"
],
"cordovaPlatforms": [],
"description": "Boaine: An Ionic project"
}
having the same issue with Text-To-Speech plugin
Here is what I did to fix it.
1- Delete ionic-native entry in package.json
2- npm install @ionic-native/core --save
3- npm install --save @ionic-native/text-to-speech
I had this same issue with the cordova-plugin-googlemaps plugin. @haninaguib's steps above fixed the issue for me.
Hi guys,
I followed the described steps in: https://ionicframework.com/docs/storage/
Anyway I still get following error in the console:
NoProviderError
o @ polyfills.js:3
polyfills.js:3 Unhandled Promise rejection: No provider for Storage! ; Zone: <root> ; Task: Promise.then ; Value: NoProviderError Error: DI Error
at v (http://localhost:8100/build/polyfills.js:3:4864)
at NoProviderError.BaseError [as constructor] (http://localhost:8100/build/main.js:38922:27)
at NoProviderError.AbstractProviderError [as constructor] (http://localhost:8100/build/main.js:83936:16)
at new NoProviderError (http://localhost:8100/build/main.js:83998:16)
at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/main.js:141146:19)
My app.module.ts looks like this:
`import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { IonicStorageModule } from '@ionic/storage';
...
@NgModule({
declarations: [
....
],
imports: [
AngularFireModule.initializeApp(firebaseConfig),
IonicModule.forRoot(ConferenceApp, {
backButtonText: '',
backButtonIcon: 'ios-arrow-back',
iconMode: 'ios',
mode: 'ios',
modalEnter: 'modal-slide-in',
modalLeave: 'modal-slide-out',
tabsPlacement: 'bottom',
tabSubPages: false,
prodMode: true,
pageTransition: 'ios'
},
IonicStorageModule.forRoot()
)],
bootstrap: [IonicApp],
entryComponents: [
...
],
providers: [
] `
any my package.json looks like this:
{
....
},
"scripts": {
"build": "ionic-app-scripts build",
"clean": "ionic-app-scripts clean",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve",
"e2e": "ionic-app-scripts build && protractor",
"postinstall": "webdriver-manager update"
},
"dependencies": {
"@angular/common": "2.4.8",
"@angular/compiler": "2.4.8",
"@angular/compiler-cli": "2.4.8",
"@angular/core": "2.4.8",
"@angular/forms": "2.4.8",
"@angular/http": "2.4.8",
"@angular/platform-browser": "2.4.8",
"@angular/platform-browser-dynamic": "2.4.8",
"@angular/platform-server": "2.4.8",
"@ionic-native/contacts": "^3.5.0",
"@ionic-native/core": "^3.5.0",
"@ionic/storage": "^2.0.0",
"angularfire2": "^2.0.0-beta.8",
"firebase": "^3.7.2",
"ionic-angular": "2.2.0",
"ionicons": "3.0.0",
"rxjs": "5.0.1",
"sw-toolbox": "3.4.0",
"zone.js": "0.7.2"
},
"devDependencies": {
"@ionic/app-scripts": "1.1.4",
"@types/jasmine": "2.5.41",
"@types/node": "^7.0.13",
"connect": "^3.6.0",
"jasmine": "^2.5.3",
"jasmine-spec-reporter": "^4.0.0",
"protractor": "^5.1.1",
"ts-node": "^3.0.2",
"typescript": "2.0.9"
}
}
Does anybody know, what`s wrong?
Thanks in advance!
@Miggel1988 your app.module is right but when using Storage in your pages and components you need to import { Storage } from '@ionic/storage'; are you doing that?
Looks like this is fixed.
having same issue how did you resove it?
@sabarinathen what exactly is your problem?
Most helpful comment
Here is what I did to fix it.
1- Delete ionic-native entry in package.json
2- npm install @ionic-native/core --save
3- npm install --save @ionic-native/text-to-speech