-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng build
output truncated when run as a child process
#10922
Comments
This is an interesting problem. For reference the issues on node seem to be nodejs/node#2360 and nodejs/node#19218. A specially relevant highlight is nodejs/node#19218 (comment):
This makes me think that we shouldn't use |
Without this, the 'error' event is unhandled, which results in the process dying. Print the error and move on. Added because of 'write after end' stream error from shelling out Angular CLI. Possibly revert pending this issue: angular/angular-cli#10922
@filipesilva Would you accept a PR where the loggers are switched to using |
@dwieeb I think we already do now in CLI 7. Our webpack build uses a provided logger: angular-cli/packages/angular_devkit/build_angular/src/browser/index.ts Lines 189 to 205 in e5aea19
The logger is instantiated in the CLI:
And will use angular-cli/packages/angular_devkit/core/node/cli-logger.ts Lines 18 to 22 in e5aea19
|
Interesting, I'm still seeing this with latest CLI.
The following trick still works:
I can investigate further next week. |
Hi @dwieeb, is this still a problem? |
No, I haven't seen this in a while. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The output of
ng build
is truncated to 8192 bytes when run as a child process.Versions
Repro steps
git clone https://github.com/dwieeb/ng-build-truncated-output
npm install
node script.js
Observed behavior
Desired behavior

Mention any other details that might be useful (optional)
Something I observed is that using
setBlocking(true)
in theng
bin file appears to flush the output properly:Could be related to stdout not being flushed before a
process.exit()
is called.The text was updated successfully, but these errors were encountered: