Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
[x] 4.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Current behavior:
When running ionic cordova run browser the error projects.app key in angular.json is undefined--cannot add assets. is thrown.
Expected behavior:
Ionic CLI should be able to run ionic cordova run browser if there is only one project in the angular.json projects list without it being named 'app'. If the Ionic CLI cannot support a multiple app configuration, allow a default app to be specified in the Ionic config or take the first available project if only one is specified. If more than one is available, i would expect an error to be thrown and a message given saying that a entry app needs to be specified in the Ionic config.
I should not have to rename my app to 'app' in order to run the ionic CLI serve command.
Steps to reproduce:
Take an ionic 3 project and add a .angular-cli.json file to it. Use ng upgrade to upgrade the schema so that it now is compliant with angular.json schema. Use the Ionic v4 CLI to try and run the app.
{
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"my-app": {
"root": "",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/app/main.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "/assets"
}
],
"styles": [],
"scripts": []
},
"configurations": {}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "my-app:build"
},
"configurations": {}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "my-app:build"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [],
"exclude": []
}
}
}
},
"my-app-e2e": {
"root": "",
"projectType": "application",
"cli": {},
"schematics": {}
}
},
"cli": {}
}
Other information:
Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
@ionic/cli-utils : 2.0.0-rc.5
ionic (Ionic CLI) : 4.0.0-rc.5
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@angular-devkit/core : 0.5.7
@angular-devkit/schematics : 0.5.7
@angular/cli : 6.0.0-rc.5
@ionic/schematics-angular : 1.0.0-rc.5
Cordova Platforms : browser 5.0.3
Ionic Framework : @ionic/angular 4.0.0-alpha.2
System:
NodeJS : v8.11.1
npm : 5.6.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : not set
Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
[x] 4.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Current behavior:
When running
ionic cordova run browserthe errorprojects.app key in angular.json is undefined--cannot add assets.is thrown.Expected behavior:
Ionic CLI should be able to run
ionic cordova run browserif there is only one project in theangular.jsonprojects list without it being named 'app'. If the Ionic CLI cannot support a multiple app configuration, allow a default app to be specified in the Ionic config or take the first available project if only one is specified. If more than one is available, i would expect an error to be thrown and a message given saying that a entry app needs to be specified in the Ionic config.I should not have to rename my app to 'app' in order to run the ionic CLI serve command.
Steps to reproduce:
Take an ionic 3 project and add a .angular-cli.json file to it. Use
ng upgradeto upgrade the schema so that it now is compliant withangular.jsonschema. Use the Ionic v4 CLI to try and run the app.Other information:
Ionic info: (run
ionic infofrom a terminal/cmd prompt and paste output below):