ionic serve is working. Please help me.
When I want to create a build for the android and run the command ionic cordova build android getting error :
Looks like you have some deps that are out of date. What’s your package.json look like?
Thanks for reply. My package.json is as below:
{
“name”: “newHelpDesk”,
“version”: “0.0.1”,
“author”: “Araza”,
“homepage”: “https://ionicframework.com/”,
“scripts”: {
“ng”: “ng”,
“start”: “ng serve”,
“build”: “ng build”,
“test”: “ng test”,
“lint”: “ng lint”,
“e2e”: “ng e2e”
},
“private”: true,
“dependencies”: {
“@angular/common”: “~8.1.2”,
“@angular/core”: “~8.1.2”,
“@angular/forms”: “~8.1.2”,
“@angular/http”: “^7.2.16”,
“@angular/platform-browser”: “~8.1.2”,
“@angular/platform-browser-dynamic”: “~8.1.2”,
“@angular/router”: “~8.1.2”,
“@ionic-native/android-permissions”: “^5.34.0”,
“@ionic-native/base64”: “^5.34.0”,
“@ionic-native/calendar”: “^5.34.0”,
“@ionic-native/camera”: “^5.34.0”,
“@ionic-native/core”: “^5.34.0”,
“@ionic-native/document-viewer”: “^5.34.0”,
“@ionic-native/downloader”: “^5.34.0”,
“@ionic-native/file”: “^5.34.0”,
“@ionic-native/file-transfer”: “^5.34.0”,
“@ionic-native/in-app-browser”: “^5.34.0”,
“@ionic-native/network”: “^5.34.0”,
“@ionic-native/photo-viewer”: “^5.34.0”,
“@ionic-native/splash-screen”: “^5.34.0”,
“@ionic-native/status-bar”: “^5.34.0”,
“@ionic/angular”: “^4.11.13”,
“@ionic/storage”: “^2.3.1”,
“@types/hammerjs”: “^2.0.40”,
“aws-sdk”: “^2.942.0”,
“browserify”: “^16.5.1”,
“ckeditor4-angular”: “^2.2.1”,
“com-sarriaroman-photoviewer”: “^1.2.5”,
“cordova-plugin-android-permissions”: “^1.1.2”,
“cordova-plugin-calendar”: “^5.1.5”,
“cordova-plugin-camera”: “^4.1.0”,
“cordova-plugin-device”: “^2.0.3”,
“cordova-plugin-document-viewer”: “^0.9.13”,
“cordova-plugin-file”: “^6.0.2”,
“cordova-plugin-file-transfer”: “^1.7.1”,
“cordova-plugin-inappbrowser”: “^3.2.0”,
“cordova-plugin-ionic-keyboard”: “^2.2.0”,
“cordova-plugin-ionic-webview”: “^2.3.2”,
“cordova-plugin-network-information”: “^2.0.2”,
“cordova-plugin-splashscreen”: “^5.0.4”,
“cordova-plugin-statusbar”: “^2.4.3”,
“cordova-plugin-whitelist”: “^1.3.5”,
“cordova-sqlite-storage”: “^4.0.0”,
“core-js”: “^2.6.12”,
“hammerjs”: “^2.0.8”,
“integrator-cordova-plugin-downloader”: “^1.1.0”,
“ionic-long-press”: “^2.0.3”,
“ionic4-long-press”: “^1.0.6”,
“native-run”: “^1.4.0”,
“ng2-file-upload”: “^1.4.0”,
“node-sass”: “^4.13.1”,
“resources”: “^0.4.3”,
“rxjs”: “^6.5.5”,
“striptags”: “^3.2.0”,
“tslib”: “^1.14.1”,
“zone.js”: “~0.9.1”
},
“devDependencies”: {
“@angular-devkit/architect”: “~0.801.2”,
“@angular-devkit/build-angular”: “^0.801.3”,
“@angular-devkit/core”: “^8.3.29”,
“@angular-devkit/schematics”: “~8.1.2”,
“@angular/cli”: “8.3.29”,
“@angular/compiler”: “^8.2.14”,
“@angular/compiler-cli”: “^8.2.14”,
“@angular/language-service”: “~8.1.2”,
“@ionic/angular-toolkit”: “^4.0.0”,
“@ionic/app-scripts”: “^3.2.4”,
“@types/jasmine”: “~3.3.8”,
“@types/jasminewd2”: “^2.0.10”,
“@types/node”: “^8.10.66”,
“codelyzer”: “^5.2.2”,
“com-badrit-base64”: “^0.2.0”,
“jasmine-core”: “~3.4.0”,
“jasmine-spec-reporter”: “~4.2.1”,
“karma”: “~4.1.0”,
“karma-chrome-launcher”: “~2.2.0”,
“karma-coverage-istanbul-reporter”: “~2.0.1”,
“karma-jasmine”: “~2.0.1”,
“karma-jasmine-html-reporter”: “^1.6.0”,
“protractor”: “^5.4.4”,
“ts-node”: “~7.0.0”,
“tslint”: “~5.15.0”,
“typescript”: “~3.4.5”
},
“description”: “Help Desk project”,
“cordova”: {
“plugins”: {
“cordova-plugin-file”: {},
“cordova-sqlite-storage”: {},
“cordova-plugin-whitelist”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-calendar”: {},
“cordova-plugin-inappbrowser”: {},
“cordova-plugin-file-transfer”: {},
“cordova-plugin-android-permissions”: {},
“cordova-plugin-ionic-webview”: {
“ANDROID_SUPPORT_ANNOTATIONS_VERSION”: “27.+”
},
“cordova-plugin-camera”: {
“ANDROID_SUPPORT_V4_VERSION”: “27.+”
},
“integrator-cordova-plugin-downloader”: {},
“cordova-plugin-document-viewer”: {},
“com-sarriaroman-photoviewer”: {},
“cordova-plugin-network-information”: {},
“com-badrit-base64”: {}
},
“platforms”: [
“android”
]
}
}
Hi mhartington,
please help me. here is my package.json
{
“name”: “newHelpDesk”,
“version”: “0.0.1”,
“author”: “Araza”,
“homepage”: “https://ionicframework.com/”,
“scripts”: {
“ng”: “ng”,
“start”: “ng serve”,
“build”: “ng build”,
“test”: “ng test”,
“lint”: “ng lint”,
“e2e”: “ng e2e”
},
“private”: true,
“dependencies”: {
“@angular/common”: “~8.1.2”,
“@angular/core”: “~8.1.2”,
“@angular/forms”: “~8.1.2”,
“@angular/http”: “^7.2.16”,
“@angular/platform-browser”: “~8.1.2”,
“@angular/platform-browser-dynamic”: “~8.1.2”,
“@angular/router”: “~8.1.2”,
“@ionic-native/android-permissions”: “^5.34.0”,
“@ionic-native/base64”: “^5.34.0”,
“@ionic-native/calendar”: “^5.34.0”,
“@ionic-native/camera”: “^5.34.0”,
“@ionic-native/core”: “^5.34.0”,
“@ionic-native/document-viewer”: “^5.34.0”,
“@ionic-native/downloader”: “^5.34.0”,
“@ionic-native/file”: “^5.34.0”,
“@ionic-native/file-transfer”: “^5.34.0”,
“@ionic-native/in-app-browser”: “^5.34.0”,
“@ionic-native/network”: “^5.34.0”,
“@ionic-native/photo-viewer”: “^5.34.0”,
“@ionic-native/splash-screen”: “^5.34.0”,
“@ionic-native/status-bar”: “^5.34.0”,
“@ionic/angular”: “^4.11.13”,
“@ionic/storage”: “^2.3.1”,
“@types/hammerjs”: “^2.0.40”,
“aws-sdk”: “^2.942.0”,
“browserify”: “^16.5.1”,
“ckeditor4-angular”: “^2.2.1”,
“com-sarriaroman-photoviewer”: “^1.2.5”,
“cordova-plugin-android-permissions”: “^1.1.2”,
“cordova-plugin-calendar”: “^5.1.5”,
“cordova-plugin-camera”: “^4.1.0”,
“cordova-plugin-device”: “^2.0.3”,
“cordova-plugin-document-viewer”: “^0.9.13”,
“cordova-plugin-file”: “^6.0.2”,
“cordova-plugin-file-transfer”: “^1.7.1”,
“cordova-plugin-inappbrowser”: “^3.2.0”,
“cordova-plugin-ionic-keyboard”: “^2.2.0”,
“cordova-plugin-ionic-webview”: “^2.3.2”,
“cordova-plugin-network-information”: “^2.0.2”,
“cordova-plugin-splashscreen”: “^5.0.4”,
“cordova-plugin-statusbar”: “^2.4.3”,
“cordova-plugin-whitelist”: “^1.3.5”,
“cordova-sqlite-storage”: “^4.0.0”,
“core-js”: “^2.6.12”,
“hammerjs”: “^2.0.8”,
“integrator-cordova-plugin-downloader”: “^1.1.0”,
“ionic-long-press”: “^2.0.3”,
“ionic4-long-press”: “^1.0.6”,
“native-run”: “^1.4.0”,
“ng2-file-upload”: “^1.4.0”,
“node-sass”: “^4.13.1”,
“resources”: “^0.4.3”,
“rxjs”: “^6.5.5”,
“striptags”: “^3.2.0”,
“tslib”: “^1.14.1”,
“zone.js”: “~0.9.1”
},
“devDependencies”: {
“@angular-devkit/architect”: “~0.801.2”,
“@angular-devkit/build-angular”: “^0.801.3”,
“@angular-devkit/core”: “^8.3.29”,
“@angular-devkit/schematics”: “~8.1.2”,
“@angular/cli”: “8.3.29”,
“@angular/compiler”: “^8.2.14”,
“@angular/compiler-cli”: “^8.2.14”,
“@angular/language-service”: “~8.1.2”,
“@ionic/angular-toolkit”: “^4.0.0”,
“@ionic/app-scripts”: “^3.2.4”,
“@types/jasmine”: “~3.3.8”,
“@types/jasminewd2”: “^2.0.10”,
“@types/node”: “^8.10.66”,
“codelyzer”: “^5.2.2”,
“com-badrit-base64”: “^0.2.0”,
“jasmine-core”: “~3.4.0”,
“jasmine-spec-reporter”: “~4.2.1”,
“karma”: “~4.1.0”,
“karma-chrome-launcher”: “~2.2.0”,
“karma-coverage-istanbul-reporter”: “~2.0.1”,
“karma-jasmine”: “~2.0.1”,
“karma-jasmine-html-reporter”: “^1.6.0”,
“protractor”: “^5.4.4”,
“ts-node”: “~7.0.0”,
“tslint”: “~5.15.0”,
“typescript”: “~3.4.5”
},
“description”: “Help Desk project”,
“cordova”: {
“plugins”: {
“cordova-plugin-file”: {},
“cordova-sqlite-storage”: {},
“cordova-plugin-whitelist”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-calendar”: {},
“cordova-plugin-inappbrowser”: {},
“cordova-plugin-file-transfer”: {},
“cordova-plugin-android-permissions”: {},
“cordova-plugin-ionic-webview”: {
“ANDROID_SUPPORT_ANNOTATIONS_VERSION”: “27.+”
},
“cordova-plugin-camera”: {
“ANDROID_SUPPORT_V4_VERSION”: “27.+”
},
“integrator-cordova-plugin-downloader”: {},
“cordova-plugin-document-viewer”: {},
“com-sarriaroman-photoviewer”: {},
“cordova-plugin-network-information”: {},
“com-badrit-base64”: {}
},
“platforms”: [
“android”
]
}
}
“@ionic/angular-toolkit”: “^4.0.0
You’re using a newer version of ionic/angular-toolkit that does not support v8 of Angular. You either need to update your angular version of downgrade your version of angular-toolkit.
Thanks for giving time. I run the npm install --save @ionic/angular-toolkit@3.1.1 which is installed successfully also changed in package.json but issue is as before. Please help me
Pretty sure you’ll need to downgrade to v2 of angular toolkit. But you should instead keep all your deps up to date.
Upgrade your angular version, etc.
Any Udpate here. i updated ionic 5 and angular 9. i have same issue
My package.json
“dependencies”: {
"@angular/animations": "9.1.13",
"@angular/cdk": "^11.2.13",
"@angular/common": "9.1.13",
"@angular/core": "9.1.13",
"@angular/fire": "5.2.1",
"@angular/forms": "9.1.13",
"@angular/localize": "^9.1.13",
"@angular/material": "7.3.7",
"@angular/platform-browser": "9.1.13",
"@angular/platform-browser-dynamic": "9.1.13",
"@angular/platform-server": "^12.2.1",
"@angular/router": "9.1.13",
"@bugsnag/core": "7.11.0",
"@bugsnag/js": "7.11.0",
"@bugsnag/plugin-angular": "6.5.2",
"@ionic-enterprise/secure-storage": "^2.1.1",
"@ionic-native/app-version": "5.14.0",
"@ionic-native/badge": "5.18.0",
"@ionic-native/browser-tab": "5.26.0",
"@ionic-native/camera": "5.8.0",
"@ionic-native/chooser": "5.19.1",
"@ionic-native/core": "5.0.0",
"@ionic-native/deeplinks": "5.5.1",
"@ionic-native/device": "5.13.0",
"@ionic-native/fcm": "5.11.0",
"@ionic-native/file": "5.19.1",
"@ionic-native/file-chooser": "5.19.1",
"@ionic-native/file-path": "5.19.1",
"@ionic-native/file-picker": "5.20.0",
"@ionic-native/file-transfer": "5.19.1",
"@ionic-native/firebase": "5.11.0",
"@ionic-native/firebase-dynamic-links": "5.27.0",
"@ionic-native/firebase-x": "5.23.0",
"@ionic-native/google-plus": "5.7.0",
"@ionic-native/http": "5.21.6",
"@ionic-native/in-app-browser": "5.11.0",
"@ionic-native/intercom": "5.22.0",
"@ionic-native/keyboard": "5.13.0",
"@ionic-native/network": "5.12.0",
"@ionic-native/splash-screen": "5.0.0",
"@ionic-native/status-bar": "5.0.0",
"@ionic/angular": "5.6.13",
"@ionic/pro": "2.0.4",
"@ionic/storage": "^3.0.6",
"@ionic/storage-angular": "3.0.6",
"@nth-cloud/ng-mentions": "2.0.3",
"@types/jquery": "3.3.33",
"angularfire2": "5.2.1",
"autolinker": "3.1.0",
"chart.js": "2.9.4",
"chartjs-plugin-annotation": "0.5.7",
"cordova": "9.0.0",
"cordova-android": "9.0.0",
"cordova-ios": "5.1.1",
"cordova-plugin-advanced-http": "2.4.1",
"cordova-plugin-android-rootbeer": "1.0.0",
"cordova-plugin-androidx": "2.0.0",
"cordova-plugin-androidx-adapter": "1.1.1",
"cordova-plugin-app-version": "0.1.9",
"cordova-plugin-badge": "0.8.8",
"cordova-plugin-browsertab": "0.2.0",
"cordova-plugin-camera": "4.1.0",
"cordova-plugin-compat": "1.2.0",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-file": "6.0.2",
"cordova-plugin-file-transfer": "1.7.1",
"cordova-plugin-filechooser": "1.2.0",
"cordova-plugin-filepath": "1.5.8",
"cordova-plugin-filepicker": "1.1.6",
"cordova-plugin-firebase-analytics": "4.3.1",
"cordova-plugin-firebase-dynamiclinks": "4.4.0",
"cordova-plugin-firebasex": "10.1.2-cli",
"cordova-plugin-googleplus": "8.5.0",
"cordova-plugin-inappbrowser": "git+https://github.com/thambui/cordova-plugin-inappbrowser.git",
"cordova-plugin-ionic": "5.4.0",
"cordova-plugin-ionic-keyboard": "2.1.3",
"cordova-plugin-ionic-webview": "4.2.0",
"cordova-plugin-jailbreak-detection": "0.1.0",
"cordova-plugin-network-information": "2.0.2",
"cordova-plugin-splashscreen": "5.0.3",
"cordova-plugin-whitelist": "1.3.4",
"cordova-support-android-plugin": "1.0.2",
"cordova-support-google-services": "1.4.1",
"core-js": "2.5.4",
"crypto-js": "4.1.1",
"firebase": "7.24.0",
"gulp-replace": "1.0.0",
"hammerjs": "2.0.8",
"ionic": "4.12.0",
"ionic-plugin-deeplinks": "1.0.20",
"moment": "2.24.0",
"ng2-charts": "2.2.3",
"ngx-avatar": "3.7.0",
"ngx-moment": "3.4.0",
"ngx-quill": "5.2.0",
"ngx-segment-analytics": "1.8.0",
"node-pre-gyp": "0.12.0",
"pluralize": "8.0.0",
"quill-mention": "2.1.1",
"rxjs": "6.6.7",
"secure-storage": "^0.2.1",
"secure-web-storage": "1.0.2",
"time-ago-pipe": "1.3.2",
"tslib": "1.10.0",
"url-parse": "1.5.3",
"yargs": "14.0.0",
"zone.js": "~0.10.2"
},
“devDependencies”: {
"@angular-devkit/architect": "0.1202.1",
"@angular-devkit/build-angular": "^0.901.15",
"@angular-devkit/core": "9.1.15",
"@angular-devkit/schematics": "9.1.15",
"@angular/cli": "9.1.15",
"@angular/compiler": "9.1.13",
"@angular/compiler-cli": "9.1.13",
"@angular/language-service": "9.1.13",
"@ionic/angular-toolkit": "^3.1.1",
"@ionic/lab": "1.0.24",
"@types/jasmine": "2.8.8",
"@types/jasminewd2": "2.0.3",
"@types/lodash": "4.14.133",
"@types/node": "12.11.1",
"codelyzer": "5.1.2",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-ionic-keyboard": "2.1.3",
"cordova-plugin-statusbar": "2.4.2",
"gulp": "4.0.2",
"gulp-run": "1.7.1",
"handlebars": "4.7.7",
"husky": "4.2.5",
"jasmine-core": "2.99.1",
"jasmine-spec-reporter": "4.2.1",
"karma": "6.3.4",
"karma-chrome-launcher": "2.2.0",
"karma-coverage-istanbul-reporter": "2.0.1",
"karma-jasmine": "1.1.2",
"karma-jasmine-html-reporter": "0.2.2",
"karma-junit-reporter": "2.0.1",
"ngx-spec": "2.1.4",
"node": "12.16.0",
"npm": "6.14.14",
"protractor": "5.4.0",
"ts-node": "8.1.0",
"tslint": "5.16.0",
"typescript": "3.8.3"
},
I would suggest aligning the major version on everything Angular in your project. I’m seeing 9s, 11s, and 12s in there.
create an other project and update plugins and angular