I am having a nightmare as always with npm packages and ionic / cordova. I run:
ionic cordova platform add android
And i get this error:
Cannot overwrite directory
‘/Volumes/Work/Projects/green-water-services/platforms/android/app/src/main’
with non-directory
‘/Volumes/Work/Projects/green-water-services/plugins/cordova-plugin-firebase/src/android/google-services.json’.
I have no idea what it’s doing! Here is my package:
{
"name": "green-water-services",
"version": "0.0.1",
"author": "Ionic Framework",
"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": "^11.2.14",
"@angular/core": "^11.2.14",
"@angular/fire": "^6.1.5",
"@angular/forms": "^11.2.14",
"@angular/platform-browser": "^11.2.14",
"@angular/platform-browser-dynamic": "^11.2.14",
"@angular/router": "^11.2.14",
"@ionic-native/ble": "^5.6.11",
"@ionic-native/bluetooth-serial": "^5.6.11",
"@ionic-native/camera": "^5.6.11",
"@ionic-native/core": "^5.6.11",
"@ionic-native/firebase": "^5.6.11",
"@ionic/angular": "^5.6.11",
"@ionic/app-scripts": "^3.2.4",
"cordova-plugin-bluetooth-serial": "^0.4.7",
"firebase": "^8.6.8",
"ionic": "^5.4.16",
"ionicons": "^5.5.2",
"npm": "^8.3.0",
"rxjs": "~6.6.0",
"rxjs-compat": "^6.6.7",
"signature_pad": "^4.0.1",
"tslib": "^2.3.0",
"typescript": "4.1.6",
"zone.js": "^0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^12.1.0",
"@angular-eslint/builder": "2.0.2",
"@angular-eslint/eslint-plugin": "2.0.2",
"@angular-eslint/eslint-plugin-template": "2.0.2",
"@angular-eslint/template-parser": "2.0.2",
"@angular/cli": "11.2.14",
"@angular/compiler": "^11.2.14",
"@angular/compiler-cli": "^11.2.14",
"@angular/language-service": "^11.2.14",
"@ionic/angular-toolkit": "^3.1.1",
"@types/jasmine": "^3.7.7",
"@types/jasminewd2": "^2.0.9",
"@types/node": "^12.20.15",
"@typescript-eslint/eslint-plugin": "4.16.1",
"@typescript-eslint/parser": "4.16.1",
"cordova-android": "^10.1.1",
"cordova-plugin-ble-central": "^1.3.1",
"cordova-plugin-camera": "^5.0.2",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-firebase": "^2.0.5",
"cordova-plugin-firebase-lib": "^5.1.1",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.2.1",
"cordova-plugin-splashscreen": "^5.0.4",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.5",
"eslint": "^7.29.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.2",
"firebase-tools": "^9.14.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "^6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.6.0",
"postcss": "^8.4.5",
"protractor": "~7.0.0",
"ts-node": "~8.3.0"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-bluetooth-serial": {},
"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-plugin-ble-central": {
"ACCESS_BACKGROUND_LOCATION": "false"
},
"cordova-plugin-firebase": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
}
},
"platforms": []
}
}
Output of ng version is:
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1202.14
@angular-devkit/build-angular 12.2.14
@angular-devkit/core 12.2.14
@angular-devkit/schematics 11.2.14
@angular/fire 6.1.5
@schematics/angular 11.2.14
@schematics/update 0.1102.14
rxjs 6.6.7
typescript 4.1.6
It works fine when serving or running to a device, but as soon as i try to build it errors happen all over. Does anyone have any idea what is going on?
2 posts - 2 participants