ng deploy shows success message even if app building fails
See original GitHub issueEven if there’s a problem in my code and the Angular Compiler detects the issue, the deploy builder assumes that all of the commands have run successfully:
📦 Building "rss-reader". Configuration: "production". Your base-href: "/rss-reader/"
chunk {0} runtime-es2015.b2aca5be9e7b8cc1a1b4.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main-es2015.e979d12557647e8d62fa.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills-es2015.270671f3654e232e0bbe.js (polyfills) 130 bytes [initial] [rendered]
chunk {3} styles.7d2e006da3faa06dd951.css (styles) 249 kB [initial] [rendered]
ERROR in app/components/release-notes/release-notes.component.ts:54:5 - error TS2322: Type 'Release' is not assignable to type 'string'.
54 return this.releaseNotes.releases[version];
chunk {scripts} scripts.df42bf43cef21311bf2d.js (scripts) 20.5 kB [entry] [rendered]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Date: 2019-09-03T14:02:29.664Z - Hash: ac8c61e38fe1b05d4fdf - Time: 15741ms
app/app.component.ts:122:7 - error TS2345: Argument of type '{ id: string; title: string; icon: string; showAsAction: false; onClickListener: () => any; }' is not assignable to parameter of type 'ActionItem'.
Object literal may only specify known properties, and 'id' does not exist in type 'ActionItem'.
122 id: 'keyboard-shortcuts-action-item',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
app/app.component.ts:126:43 - error TS2551: Property 'openHotkeyHelpDialog' does not exist on type 'HotkeysService'. Did you mean 'hotkeyHelpDialogId'?
126 onClickListener: () => this.hotkeys.openHotkeyHelpDialog()
~~~~~~~~~~~~~~~~~~~~
app/hotkeys/hotkeys.service.ts:36:12
36 readonly hotkeyHelpDialogId = 'hotkey-help-dialog';
~~~~~~~~~~~~~~~~~~
'hotkeyHelpDialogId' is declared here.
index.html could not be copied to 404.html. This does not look like an angular-cli project?!
(Hint: are you sure that you have setup the directory correctly?)
🚀 Successfully published via angular-cli-ghpages! Have a nice day!
Ideally, the deploy builder should show that there’s something wrong with the code above and stop the deploying process and/or not show the message that the site was successfully published.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >Deployment - Angular
When you are ready to deploy your Angular application to a remote server, you have various options for deployment. Simple deployment optionslink.
Read more >Angular: Cannot Get / - Stack Overflow
Run ng build in your command line/terminal, and it should display a useful error, such as the example in red here: Property 'name'...
Read more >Top 18 Most Common AngularJS Developer Mistakes - Toptal
Common Mistake #14: Misunderstanding The Digest. This AngularJS error was already partly covered in mistakes 9. b and in 13.
Read more >Global Error Handling in Angular - Philipp Kief
Even if an application has been thoroughly tested before deployment, ... The third button shows a successful request, where no error message is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Okay, this should be an error. I will have to research on that…
This was fixed in https://github.com/angular-schule/angular-cli-ghpages/commit/6a8a3c217375b423a5654c388299bf3a12f9e375 (use callback to retrieve error message of gh-pages)