fix(@angular/cli): print ng update errors stack to log file#16973
Merged
kyliau merged 1 commit intoangular:masterfrom Feb 18, 2020
alan-agius4:ng-update-log-file
Merged
fix(@angular/cli): print ng update errors stack to log file#16973kyliau merged 1 commit intoangular:masterfrom alan-agius4:ng-update-log-file
ng update errors stack to log file#16973kyliau merged 1 commit intoangular:masterfrom
alan-agius4:ng-update-log-file
Conversation
devversion
approved these changes
Feb 14, 2020
Member
devversion
left a comment
There was a problem hiding this comment.
Awesome. Thanks @alan-agius4 for picking this up so fast! 🎉
clydin
approved these changes
Feb 15, 2020
When an error occurs during ng update we currently discard the stack trace which in some cases made it hard to identify the cause of the error. Now, we print the stack trace to a log file similarly to unhandled exceptions. Example of CMD output; ```cmd ** Executing migrations of package '@angular/core' ** > Static flag migration. Removes the `static` flag from dynamic queries. As of Angular 9, the "static" flag defaults to false and is no longer required for your view and content queries. Read more about this here: https://v9.angular.io/guide/migration-dynamic-flag × Migration failed: x See "C:\Users\alag\AppData\Local\Temp\ng-NgmC1G\angular-errors.log" for further details. ``` Example of log file contents: ```txt [error] Error: x at UpdateCommand.executeSchematic (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:98:19) at UpdateCommand.executePackageMigrations (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:167:39) at UpdateCommand.executeMigrations (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:161:21) at UpdateCommand.run (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:394:38) at async UpdateCommand.validateAndRun (C:\git\angular-cli\test\node_modules\@angular\cli\models\command.js:134:28) at async Object.runCommand (C:\git\angular-cli\test\node_modules\@angular\cli\models\command-runner.js:201:24) at async default_1 (C:\git\angular-cli\test\node_modules\@angular\cli\lib\cli\index.js:62:31) ```
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an error occurs during
ng updatewe currently discard the stack trace which in some cases made it hard to identify the cause of the error.Now, we print the stack trace to a log file similarly to unhandled exceptions.
Example of CMD output;
Example of log file contents:
[error] Error: x at UpdateCommand.executeSchematic (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:98:19) at UpdateCommand.executePackageMigrations (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:167:39) at UpdateCommand.executeMigrations (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:161:21) at UpdateCommand.run (C:\git\angular-cli\test\node_modules\@angular\cli\commands\update-impl.js:394:38) at async UpdateCommand.validateAndRun (C:\git\angular-cli\test\node_modules\@angular\cli\models\command.js:134:28) at async Object.runCommand (C:\git\angular-cli\test\node_modules\@angular\cli\models\command-runner.js:201:24) at async default_1 (C:\git\angular-cli\test\node_modules\@angular\cli\lib\cli\index.js:62:31)//cc @devversion