Trying to compile my ionic app got this error:
ionic:lib:telemetry Sending telemetry for command: 'ionic cordova build' [ 'android', '--verbose', '--interactive', '--color' ] +0ms
ionic:lib:hooks Looking for ionic:build:before npm script. +0ms
ionic:lib:build Looking for ionic:build npm script. +8ms
> ng.cmd run app:ionic-cordova-build --platform=android
ng:analytics getGlobalAnalytics +0ms
ng:analytics Client Analytics config found: null +3ms
ng:analytics Analytics settings not found. Ignoring all analytics. +0ms
ng:analytics getSharedAnalytics +1ms
Schema validation failed with the following errors:
Data path "/scripts/0" must NOT have additional properties(lazy).
Data path "/scripts/0" must be string.
Data path "/scripts/0" must match exactly one schema in oneOf.
[ERROR] An error occurred while running subprocess ng.
ng.cmd run app:ionic-cordova-build --platform=android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Ionic Info
Ionic:
Ionic CLI : 6.20.8 (C:\Users\1515 USER\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 5.6.11
@angular-devkit/build-angular : 12.0.5
@angular-devkit/schematics : 12.1.2
@angular/cli : 12.0.5
@ionic/angular-toolkit : 2.1.2
Capacitor:
Capacitor CLI : 3.1.1
@capacitor/android : 3.1.1
@capacitor/core : 3.1.1
@capacitor/ios : 3.1.1
Cordova:
Cordova CLI : 11.1.0
Cordova Platforms : android 10.1.2
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)
Utility:
cordova-res : 0.15.4
native-run : 1.4.0
System:
Android SDK Tools : 26.1.1 (C:\Android\sdk)
NodeJS : v16.18.0 (C:\Program Files\nodejs\node.exe)
npm : 8.19.2
OS : Windows 10
I found a similar issue on this thread: Build failed after updating to Ionic 5 but after remove "scripts": [],
the problem persists…
Has anyone seen this error or can give any suggestions for correction ? Thank you!