ionic-cli
ionic-cli copied to clipboard
ionic serve --ssl does not work with angular 12
Description: --ssl is broken with Angular 12
Steps to Reproduce:
ionic start myApp tabs --type=angular
ionic ssl generate
ionic serve --ssl
Output: Server starts, however, browser shows error 504
My ionic info:
Ionic:
Ionic CLI : 6.16.3 (C:\nvm\v12.20.0\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 5.6.9
@angular-devkit/build-angular : 12.0.5
@angular-devkit/schematics : 12.0.5
@angular/cli : 12.0.5
@ionic/angular-toolkit : 4.0.0
Cordova:
Cordova CLI : not installed
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res : 0.15.3
native-run : 1.4.0
System:
NodeJS : v12.20.0 (C:\nodejs\node.exe)
npm : 6.14.8
OS : Windows 10
Other Information:
Running ionic serve without --ssl runs ok.
$ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 12.0.5
Node: 12.20.0
Package Manager: npm 6.14.8
OS: win32 x64
Angular: 12.0.5
... cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1200.5
@angular-devkit/build-angular 12.0.5
@angular-devkit/core 12.0.5
@angular-devkit/schematics 12.0.5
@schematics/angular 12.0.5
rxjs 6.6.7
typescript 4.2.4
Digging in I noticed that ng serve --http throws error (it used to be ok pre-12), but ng serve --ssl works.
So I tried:
ionic serve --ssl -- --ssl
... and, it works this way!
So it seems that Angular 12 changed --http to --ssl, but ionic CLI did not change how it calls ng.