Oh hi there! 😄
To expedite issue processing please search open and closed issues before submitting a new one. Existing issues often contain information about workarounds, resolution, or progress updates.
<!-- Can you pin-point the command or commands that are effected by this bug? --> <!-- ✍️edit: -->
- [ ] new - [ ] build - [ ] serve - [ ] test - [ ] e2e - [ ] generate - [ ] add - [x] update - [ ] lint - [ ] xi18n - [ ] run - [ ] config - [ ] help - [ ] version - [ ] doc
<!-- Did this behavior use to work in the previous version? --> <!-- ✍️--> No, this issue only applies to updating from version 7 to 8.
I'm unable to update
@angular/material when following the update instructions for a basic application. After updating the project with
ng update @angular/cli @angular/core, I'm receiving an error when attempting to run
ng update @angular/material.
<!-- Simple steps to reproduce this bug.
Please include: commands run (including args), packages added, related code changes.
If reproduction steps are not enough for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue.
A good way to make a minimal reproduction is to create a new app via
ng new repro-app and add the minimum possible code to show the problem.
Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.
Issues that don't have enough info and can't be reproduced will be closed.
You can read more about issue submission guidelines here: https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-submitting-an-issue -->
ng new update-test --routing --style scss
cdinto the app's root directory and add angular material
ng add @angular/material
ng update @angular/cli @angular/core
ng update @angular/material
The error should appear after entering the command in step 5 and before the schematic executes.
<pre><code> <!-- If the issue is accompanied by an exception or an error, please share it below: --> <!-- ✍️--> Repository is not clean. Please commit or stash any changes before updating. </code></pre>
ng version and paste output below -->
_ _ ____ _ ___
/ \ _ __ __ _ _ | | __ _ _ __ / | | | |
/ △ \ | ' \ / _
| | | | |/ _ | '| | | | | | |
/ ___ | | | | (| | || | | (| | | | || |___ | |
// __| ||_, |_,||_,|| _||_|
Angular CLI: 8.0.0 Node: 12.3.1 OS: darwin x64 Angular: 8.0.0 ... animations, cli, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router
@angular-devkit/architect 0.800.0 @angular-devkit/build-angular 0.800.0 @angular-devkit/build-optimizer 0.800.0 @angular-devkit/build-webpack 0.800.0 @angular-devkit/core 8.0.0 @angular-devkit/schematics 8.0.0 @angular/cdk 7.3.7 @angular/material 7.3.7 @ngtools/webpack 8.0.0 @schematics/angular 8.0.0 @schematics/update 0.800.0 rxjs 6.5.2 typescript 3.4.5 webpack 4.30.0 </code></pre>
Anything else relevant? <!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. -->
<!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. --> I was able to reproduce on both Windows 10 and OS X.
This is expected and intentional. The git repository has uncommitted changes. If the changes aren’t committed before the update then there would be a risk that the update may fail (or succeed but leave the application in a broken state) and there may be no easy way to revert the bad changes introduced by the update.