question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cli argument "--stats-json" makes ng build --prod to always return 0 as exit code

See original GitHub issue

Versions

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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

3reactions
jbgraugcommented, Apr 23, 2018

Guys, any updates on that? Can i help fixing it?

2reactions
virgo47commented, Jul 20, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found