cli argument "--stats-json" makes ng build --prod to always return 0 as exit code
See original GitHub issueVersions
node v8.9.1
npm v5.6.0
@angular/cli: 1.6.8
macOS Sierra, Linux ubuntu
Repro steps
just run the following command in your repo and introduce some typescript errors. ng build --prod --stats-json
Observed behavior
exit code is always 0 when --stats-json argument is used (even if there are typescript errors)
Desired behavior
exit code should be 1 or anything but 0 if the build fails or has any typescript error
Mention any other details that might be useful (optional)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
ng build --prod Error: Unknown argument: prod - Stack Overflow
When I run just ng build I get the following error: This version of CLI is only compatible with Angular versions ^14.0.0, but...
Read more >ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >node_modules/@angular/cli/bin/ng build --prod" exited with ...
I needs to publish an angualar app via DevOps in a pipeline - it was working a long time now - but since...
Read more >Webpack - NativeScript Docs
This section is only aplicable to @nativescript/webpack version 5.0.0 and above. ... come with the base webpack.config.js that's pre-configured to build a ...
Read more >30 Angular tricks and tips to improve your application
Define form parameters before Component definition. ... then exit 1; fi" ... "scripts": { "bundle-report": "ng build --prod --stats-json ...
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
Guys, any updates on that? Can i help fixing it?
I was staring at empty /dist directory today and it took me couple of hours to figure out why that npm command does not fail the whole Gradle build anymore. The flag “stats-json” (added days ago as a good advice and best practice from local Angular guru) had to go away. I kindly ask for fixing this. It indeed is CI killer when applied.