Ionic error while running in node modules - ionic-framework

I get couple of errors in node modules while trying to run app using ionic and cordova build . I am getting error while running ionic cordova run androidcommand on command line. I also tried updating ionic and angular to latest build still showing me same error. Can you please help solving this issue. Following is my package.json file. Please have a look.
[01:39:24] typescript: F:/Ionic apps/myApp/node_modules/#ionic/app-scripts/dist
/util/interfaces.d.ts, line: 1
Cannot find type definition file for 'node'.
L1: import { CompilerHost, CompilerOptions, Program } from 'typescript';
L2: import { FileCache } from './file-cache';
[01:39:24] typescript: F:/Ionic apps/myApp/node_modules/#ionic/app-scripts/dist
/util/interfaces.d.ts, line: 131
Cannot find name 'Buffer'.
L130: writeFile(filePath: string, fileContent: Buffer, callback: Function)
: void;
L131: mkdirp(filePath: string, callback: Function): void;
L132: mkdir(filePath: string, callback: Function): void;
Error: Failed to transpile program
at BuildError.Error (native)
at new BuildError (F:\Ionic apps\myApp\node_modules\#ionic\app-scripts\dist\
util\errors.js:16:28)
at F:\Ionic apps\myApp\node_modules\#ionic\app-scripts\dist\transpile.js:159
:20
at transpileWorker (F:\Ionic apps\myApp\node_modules\#ionic\app-scripts\dist
\transpile.js:107:12)
at Object.transpile (F:\Ionic apps\myApp\node_modules\#ionic\app-scripts\dis
t\transpile.js:64:12)
at F:\Ionic apps\myApp\node_modules\#ionic\app-scripts\dist\build.js:109:82
[01:39:25] copy finished in 14.86 s
F:\Ionic apps\myApp>
Following is my package.json`
"name": "cricket",
"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/animations": "5.2.9",
"#angular/common": "5.2.9",
"#angular/compiler": "5.2.9",
"#angular/compiler-cli": "5.2.9",
"#angular/core": "5.2.9",
"#angular/forms": "5.2.9",
"#angular/http": "5.2.9",
"#angular/platform-browser": "5.2.9",
"#angular/platform-browser-dynamic": "5.2.9",
"#firebase/app": "^0.1.10",
"#ionic-native/core": "4.5.3",
"#ionic-native/splash-screen": "4.5.3",
"#ionic-native/status-bar": "4.5.3",
"#ionic/pro": "1.0.20",
"#ionic/storage": "^2.1.3",
"angularfire2": "^5.0.0-rc.6.0",
"cordova-android": "^6.3.0",
"cordova-plugin-device": "^2.0.1",
"cordova-plugin-firebase": "^0.1.25",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.2.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sqlite-storage": "^2.3.0",
"firebase": "^4.13.1",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"path": "^0.12.7",
"rxjs": "5.5.7",
"sw-toolbox": "3.6.0",
"upstox": "^1.2.3",
"zone.js": "0.8.20"
},
"devDependencies": {
"#ionic/app-scripts": "^3.1.7",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-firebase": {},
"cordova-sqlite-storage": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}
}
}
}
`

I solved this issue by checking cordova-android and #ionic/app-scripts compatibility from Changelog Description
1. Install cordova-android version (6.4.0 or 6.3.0) and #ionic/app-scripts version(3.1.8)
2. Remove android platform and add it agian.

Related

admob plus and ionic results in runtime error (plugin.constructor.getPluginRef is not a function)

I'm trying to implement ionic admob plus in my ionic application. But whenever I try to show the ad I get the following error. This error appears both for a banner as an interstitial ad.
ERROR Error: Uncaught (in promise): TypeError: plugin.constructor.getPluginRef is not a function
TypeError: plugin.constructor.getPluginRef is not a function
at checkAvailability (VM2270 vendor.js:50324)
at callCordovaPlugin (VM2270 vendor.js:50417)
at VM2270 vendor.js:50251
at VM2270 vendor.js:50193
at new t (VM2269 polyfills.js:3)
at tryNativePromise (VM2270 vendor.js:50192)
at getPromise (VM2270 vendor.js:50213)
at wrapOtherPromise (VM2270 vendor.js:50250)
at VM2270 vendor.js:50509
at cordova (VM2270 vendor.js:148098)
at c (VM2269 polyfills.js:3)
at new t (VM2269 polyfills.js:3)
at tryNativePromise (VM2270 vendor.js:50192)
at getPromise (VM2270 vendor.js:50213)
at wrapOtherPromise (VM2270 vendor.js:50250)
at VM2270 vendor.js:50509
at cordova (VM2270 vendor.js:148098)
at Banner.show (VM2270 vendor.js:91387)
at MyApp.webpackJsonp.717.MyApp.showAd (VM2271 main.js:2123)
at VM2271 main.js:2139
My code: for a banner ad:
this.adMob.banner.show({
id: {
android: "ca-app-pub-xxxxxxxxxxxxxxxxx/xxxxxxxxxxxxx",
ios: ""
}
});
My code: for an interstitial ad:
this.adMob.interstitial.load({
id: {
android: "ca-app-pub-xxxxxxxxxxxxxxxxx/xxxxxxxxx",
ios: ""
}
}).then(() => this.adMob.interstitial.show())
both android ad keys are correct.
My package.json:
{
"name": "xxxxxxxxxxxx",
"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/cli": "^6.2.9",
"#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-plus": "^5.17.0",
"#ionic-native/camera": "^5.15.1",
"#ionic-native/core": "^5.15.1",
"#ionic-native/device": "^5.15.1",
"#ionic-native/facebook": "^5.15.1",
"#ionic-native/file": "^5.15.1",
"#ionic-native/file-path": "^5.15.1",
"#ionic-native/file-transfer": "^5.15.1",
"#ionic-native/google-plus": "^5.15.1",
"#ionic-native/splash-screen": "^5.15.1",
"#ionic-native/status-bar": "^5.15.1",
"#ionic/lab": "^1.0.13",
"#ionic/pro": "1.0.20",
"#ionic/storage": "^2.2.0",
"cordova-admob-plus": "^0.32.0",
"cordova-android": "7.0.0",
"cordova-plugin-android-permissions": "^1.0.2",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-facebook4": "^3.2.0",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-googleplus": "^7.0.2",
"cordova-plugin-inappbrowser": "^3.1.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-plugin-x-socialsharing": "^5.4.3",
"cordova-sqlite-storage": "^2.6.0",
"es6-promise-plugin": "^4.2.2",
"ionic-angular": "3.9.2",
"ionic-long-press": "^1.5.0",
"ionicons": "3.0.0",
"ng2-cordova-oauth": "0.0.6",
"node-sass": "^4.10.0",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"#ionic/app-scripts": "3.2.3",
"core-js": "^2.6.4",
"typescript": "^3.1.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-sqlite-storage": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-file": {},
"cordova-plugin-android-permissions": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"PLAY_SERVICES_VERSION": "11.8.0"
},
"cordova-plugin-facebook4": {
"APP_ID": "xxxxxxxxxxxxxx",
"APP_NAME": "xxxxxx",
"FACEBOOK_ANDROID_SDK_VERSION": "4.38.1"
},
"cordova-plugin-statusbar": {},
"cordova-plugin-camera": {},
"cordova-plugin-filepath": {},
"cordova-admob-plus": {
"APP_ID_ANDROID": "ca-app-pub-xxxxxxxxxxxxx~xxxxxxxxxxxxx",
"PLAY_SERVICES_VERSION": "18.2.0"
}
},
"platforms": [
"android"
]
}
}
Does anyone see what is going wrong?
The problem is that the ionic plugin wrapper is broken and it just won't work. And it seems that it has been like that for a while, so it is not likely that it will be fixed anytime soon.
So, in order to make it work, uninstall everything admob-related:
ionic cordova plugin remove cordova-admob-plus
npm uninstall #ionic-native/admob-plus
Also remove from your code all the imports, instances and calls to the plugin. Then install just the cordova plugin:
cordova plugin add cordova-admob-plus --variable APP_ID_ANDROID=ca-app-pub-xxx~xxx --variable APP_ID_IOS=ca-app-pub-xxx~xxx
In the page that you are using admob on, add this before the #Component declaration:
declare var admob;
This variable will give you access to the plugin. Then you can load the banner like this:
admob.setDevMode(true);
admob.banner.show({
id: {
ios: 'ca-app-pub-xxx~xxx',
},
});
You can read more about this issue here
This is a solution that worked for me since the plugin has changed in 2022. I have the admob-plus-cordova plugin installed like this:
$ ionic cordova plugin add admob-plus-cordova --save --variable APP_ID_ANDROID=ca-app-pub-xxxx~yyyy --variable APP_ID_IOS=ca-app-pub-xxxx~yyyy
But when I used the #ionic-native/admob-plus with this, I also received the above error. I didn't want to use the Cordova plugin directly. So to resolve this, I did this:
npm uninstall #ionic-native/admob-plus
npm install #admob-plus/ionic
And then changed all reference to admob-plus From this:
import { AdMob } from '#ionic-native/admob-plus/ngx';
To This:
import { AdMob } from '#admob-plus/ionic/ngx';
That's it. Also make sure you review the code that shows the ad.
With reference to the documentation of admob plus you should use the package #admob-plus/ionic instead of #ionic-native/admob-plus.
This plugin is maintained by the same people as the cordova-package.
This should be better than directly working with cordova.

Cannot find module 'UNMET/package.json'

I'm trying to install a cordova plugin in my ionic app. But Every time and every plugin I try to install throws an error:
Cannot find module 'UNMET/package.json'
I already have to delete the paths: node_modules, plugins, platforms, www a lot of times.
I run:
npm install
ionic cordova plugin add cordova-plugin-local-notification
ionic cordova platform add android
and I tryied to change the order of this, but the problem don't be solved.
I'm running in a Ubuntu 18, ionic version is 4.8.0, cordova version is 9.0.0, cordova-lib 9.0.1, node version 8.10.0, npm 3.5.2.
I just run this line in terminal:
ionic cordova plugin add cordova-plugin-local-notification
my package json:
{
"name": "project-name",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"android": "ionic cordova run android",
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"buildAndroid": "ionic cordova build android --aot --minifyjs --minifycss"
},
"dependencies": {
"#angular/animations": "5.2.11",
"#angular/common": "5.2.11",
"#angular/compiler": "5.2.11",
"#angular/compiler-cli": "5.2.11",
"#angular/core": "5.2.11",
"#angular/fire": "^5.1.1",
"#angular/forms": "5.2.11",
"#angular/http": "5.2.11",
"#angular/platform-browser": "5.2.11",
"#angular/platform-browser-dynamic": "5.2.11",
"#ionic-native/background-geolocation": "^4.20.0",
"#ionic-native/base64": "^4.20.0",
"#ionic-native/camera": "^4.20.0",
"#ionic-native/core": "~4.18.0",
"#ionic-native/crop": "^4.20.0",
"#ionic-native/facebook": "^4.20.0",
"#ionic-native/geolocation": "^4.20.0",
"#ionic-native/google-plus": "^4.20.0",
"#ionic-native/local-notifications": "^4.20.0",
"#ionic-native/location-accuracy": "^4.20.0",
"#ionic-native/social-sharing": "^4.20.0",
"#ionic-native/splash-screen": "~4.18.0",
"#ionic-native/sqlite": "^4.20.0",
"#ionic-native/status-bar": "~4.18.0",
"#ionic/storage": "2.2.0",
"#mauron85/cordova-plugin-background-geolocation": "3.0.3",
"brmasker-ionic-3": "^1.6.3",
"com-badrit-base64": "^0.2.0",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-crop": "^0.4.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-geolocation": "4.0.2",
"cordova-plugin-googleplus": "7.0.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^3.1.2",
"cordova-plugin-local-notification": "0.9.0-beta.2",
"cordova-plugin-request-location-accuracy": "2.3.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "5.4.7",
"cordova-sqlite-storage": "^3.2.0",
"es6-promise-plugin": "4.2.2",
"firebase": "^5.8.4",
"ionic-angular": "3.9.3",
"ionicons": "3.0.0",
"ngx-multilingual": "0.0.3",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.29"
},
"devDependencies": {
"#ionic/app-scripts": "3.2.1",
"#ionic/lab": "1.0.20",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-sqlite-storage": {},
"com-badrit-base64": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-crop": {},
"cordova-plugin-mauron85-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "11+",
"ANDROID_SUPPORT_LIBRARY_VERSION": "26+",
"ICON": "#mipmap/icon",
"SMALL_ICON": "#mipmap/icon",
"ACCOUNT_NAME": "#string/app_name",
"ACCOUNT_LABEL": "#string/app_name",
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
"CONTENT_AUTHORITY": "$PACKAGE_NAME"
},
"cordova-plugin-googleplus": {
"PLAY_SERVICES_VERSION": "11.8.0"
},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "Para pegar as melhores promoções"
},
"cordova-plugin-request-location-accuracy": {
"PLAY_SERVICES_LOCATION_VERSION": "16.+"
},
"cordova-plugin-x-socialsharing": {
"ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
},
"cordova-plugin-local-notification": {}
},
"platforms": [
"android"
]
}
}
But every plugin throw this error.
I just need to install plugins in my app again.
Just update npm and you'll be able to build again :)

Cannot find module '#ionic-native/power-management/ngx'

I installed cordova power management plugin into my ionic application. Following the usage guidance "https://ionicframework.com/docs/native/power-management#installationenter link description here", I import the class as below:
import { PowerManagement } from '#ionic-native/power-management/ngx';
but, when build this ionic app, got the error:
Cannot find module '#ionic-native/power-management/ngx'
Why this error appears? How to fix it?
I try to import the class with removing the ngx module, then error disappears:
import { PowerManagement } from '#ionic-native/power-management';
my package.json file is:
{
"name": "ionicapp",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint"
},
"dependencies": {
"#angular/animations": "5.2.11",
"#angular/common": "5.2.11",
"#angular/compiler": "5.2.11",
"#angular/compiler-cli": "5.2.11",
"#angular/core": "^5.2.11",
"#angular/forms": "5.2.11",
"#angular/http": "5.2.11",
"#angular/platform-browser": "5.2.11",
"#angular/platform-browser-dynamic": "5.2.11",
"#angular/router": "^6.1.9",
"#ionic-native/background-geolocation": "^4.16.0",
"#ionic-native/background-mode": "^4.20.0",
"#ionic-native/ble": "^4.12.0",
"#ionic-native/bluetooth-serial": "^4.12.2",
"#ionic-native/camera": "4.3.3",
"#ionic-native/core": "^4.12.2",
"#ionic-native/geolocation": "^4.12.0",
"#ionic-native/google-maps": "^4.12.0",
"#ionic-native/launch-navigator": "^4.15.0",
"#ionic-native/native-storage": "^4.12.0",
"#ionic-native/network": "^4.12.2",
"#ionic-native/network-interface": "^4.12.2",
"#ionic-native/power-management": "^4.20.0",
"#ionic-native/splash-screen": "~4.11.0",
"#ionic-native/sqlite": "^4.12.2",
"#ionic-native/status-bar": "^4.11.0",
"#ionic/storage": "^2.1.3",
"#ngx-translate/core": "8.0.0",
"#ngx-translate/http-loader": "^2.0.0",
"#types/google-maps": "^3.2.0",
"#types/googlemaps": "^3.30.12",
"an": "0.0.8",
"angularfire2": "^5.0.2",
"chart.js": "^2.7.2",
"cordova-android": "7.1.0",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-background-mode": "git+https://github.com/tushe/cordova-plugin-background-mode.git",
"cordova-plugin-ble-central": "^1.2.2",
"cordova-plugin-bluetooth-serial": "^0.4.7",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-dialogs": "^2.0.1",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-googlemaps": "^2.4.2",
"cordova-plugin-ionic-keyboard": "^2.1.2",
"cordova-plugin-ionic-webview": "^2.1.0",
"cordova-plugin-mauron85-background-geolocation": "^3.0.0-alpha.43",
"cordova-plugin-nativestorage": "^2.3.2",
"cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-networkinterface": "^2.0.0",
"cordova-plugin-powermanagement-orig": "^1.1.2",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sqlite-storage": "^2.4.0",
"firebase": "^5.5.3",
"ionic-angular": "3.9.2",
"ionic-native": "4.1.1",
"ionicons": "3.0.0",
"ng2-charts": "^1.6.0",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.2.2",
"zone.js": "0.8.26",
"at.gofg.sportscomputer.powermanagement": "~1.1.2"
},
"devDependencies": {
"#ionic/app-scripts": "^3.2.0",
"#mauron85/cordova-plugin-background-geolocation": "^3.0.0-alpha.4",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-ble-central": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
},
"cordova-plugin-mauron85-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "11+",
"ANDROID_SUPPORT_LIBRARY_VERSION": "23+",
"ALWAYS_USAGE_DESCRIPTION": "App requires background tracking enabled",
"MOTION_USAGE_DESCRIPTION": "App requires motion detection"
},
"cordova-plugin-nativestorage": {},
"cordova-sqlite-storage": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-bluetooth-serial": {},
"cordova-plugin-network-information": {},
"cordova-plugin-networkinterface": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {
"OKHTTP_VERSION": "3.+"
},
"cordova-plugin-background-mode": {},
"at.gofg.sportscomputer.powermanagement": {}
},
"platforms": [
"android"
]
}
}
Use ngx if your Angular version is >=6
You seem to be using the wrong plugin version. Correct your error by following the steps mentioned below
Check your project type in ionic.config.json file.
If the type is "ionic-angular", then install 4 version.
ionic cordova plugin add cordova-plugin-powermanagement-orig
npm install #ionic-native/power-management#4
If the type is "angular", then install the latest version
ionic cordova plugin add cordova-plugin-powermanagement-orig
npm install #ionic-native/power-management
Note:
Add ngx at the end of import only if you are using Angular 6 or 6+
import { PowerManagement } from '#ionic-native/power-management/ngx';
if not remove ngx from the import both in app.module.ts and app.component.ts
import { PowerManagement } from '#ionic-native/power-management';
Refencence:https://github.com/ionic-team/ionic/issues/15225#issuecomment-414074074

Cannot find module '#ionic-native/speech-recognition'

I have installed:
npm install #ionic-native/core --save
ionic cordova plugin add cordova-plugin-speechrecognition --save
and I can even see it in package.json but when I am adding it in app.module.ts I am getting this error:
Cannot find module '#ionic-native/speech-recognition'
I do not understand what to do, I have removed it and added it many times but nothing is working.
My package.json code is below
{
"name": "quicktask",
"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": "4.4.4",
"#angular/compiler": "4.4.4",
"#angular/compiler-cli": "4.4.4",
"#angular/core": "4.4.4",
"#angular/forms": "4.4.4",
"#angular/http": "4.4.4",
"#angular/platform-browser": "4.4.4",
"#angular/platform-browser-dynamic": "4.4.4",
"#ionic-native/core": "^4.3.2",
"#ionic-native/firebase": "^4.4.2",
"#ionic-native/in-app-browser": "^4.5.2",
"#ionic-native/splash-screen": "4.3.2",
"#ionic-native/status-bar": "4.3.2",
"#ionic/storage": "^2.0.1",
"cordova-android": "^6.2.3",
"cordova-browser": "5.0.1",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-firebase": "^0.1.24",
"cordova-plugin-inappbrowser": "^1.7.2",
"cordova-plugin-ionic-webview": "^1.1.11",
"cordova-plugin-speechrecognition": "^1.2.0",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-whitelist": "^1.3.1",
"cordova-sqlite-storage": "^2.1.2",
"ionic-angular": "3.8.0",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.4.3",
"sw-toolbox": "3.6.0",
"time-ago-pipe": "^1.2.1",
"zone.js": "0.8.18"
},
"devDependencies": {
"#ionic/app-scripts": "3.0.1",
"typescript": "2.3.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-device": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-firebase": {},
"cordova-sqlite-storage": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-speechrecognition": {}
},
"platforms": [
"android",
"browser"
]
}
}
As per the docs, here, you will need to run npm install --save #ionic-native/speech-recognition in addition to installing the cordova plugin

Ionic 3 : npm install admob-free UNMEET PEER DEPENDENCIES

Ionic 3 : npm install admob-free UNMEET PEER DEPENDENCIES.
I cannot import the AdmobFree Library to the Ionic 3 project. It show error when i do npm install.
When I type :
npm install --save #ionic-native/admob-free
it show :
+-- #ionic-native/admob-free#4.5.2
`-- UNMET PEER DEPENDENCY #ionic-native/core#4.4.0
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 fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN #ionic-native/admob#3.14.0 requires a peer of #ionic-native/core#^3.6.0 but none was installed.
for more detal, this is my package.json :
{
"name": "AcehTourismMap",
"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": "^3.14.0",
"#ionic-native/admob-free": "^4.5.2",
"#ionic-native/core": "^4.4.0",
"#ionic-native/launch-navigator": "^4.5.2",
"#ionic-native/splash-screen": "4.4.0",
"#ionic-native/status-bar": "^4.4.0",
"#ionic/storage": "2.1.3",
"cordova-admob-sdk": "^0.13.1",
"cordova-android": "~7.0.0",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-admob-free": "^0.13.0",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-dialogs": "^2.0.1",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.4.1",
"cordova-plugin-whitelist": "^1.3.1",
"cordova-promise-polyfill": "0.0.2",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.1.3",
"zone.js": "0.8.18"
},
"devDependencies": {
"#ionic/app-scripts": "3.1.6",
"typescript": "2.4.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"ionic-plugin-keyboard": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-statusbar": {},
"uk.co.workingedge.phonegap.plugin.launchnavigator": {},
"cordova-plugin-admob-free": {}
},
"platforms": [
"android"
]
}
}
How to fix this? The plugin/library not downloaded, and I cannot import the AdmobFree library
import { AdMobFree } from '#ionic-native/admob-free';
Thank you for the answer, I really appreciate, thank you......