Reputation: 35
I'm trying to build my IONIC app with cordova but when I run "ionic cordova build android" I get this error:
An unhandled exception occurred: Project target does not exist.
[ERROR] An error occurred while running subprocess ng.
And here it is in full log:
[error] Error: Project target does not exist.
at findProjectTarget (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js:49:15)
at Object.getBuilderName (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js:62:46)
at WorkspaceNodeModulesArchitectHost.getBuilderNameForTarget (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js:101:35)
at RunCommand.runSingleTarget (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\models\architect-command.js:242:55)
at RunCommand.runArchitectTarget (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\models\architect-command.js:295:35)
at RunCommand.run (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\commands\run-impl.js:15:25)
at RunCommand.validateAndRun (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\models\command.js:136:33)
at async runCommand (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\models\command-runner.js:224:24)
at async default_1 (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\lib\cli\index.js:70:31)
and this is my package.json:
{
"dependencies": {
"@ionic/angular": "^6.0.0",
"@ionic/cordova-builders": "^7.0.0",
"@ionic/storage": "^3.0.6",
"@ionic/storage-angular": "^3.0.6",
"ionic-cache": "^6.0.3",
},
"cordova": {
"plugins": {
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}
},
"platforms": [
"android",
]
}
}
Upvotes: 0
Views: 395
Reputation: 171
Have you tried this?
ng add @ionic/cordova-builders
npm install -g @ionic/cli@latest
Upvotes: 2