Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repository is not clean. Please commit or stash any changes before updating In Angular 8

Error

Repository is not clean. Please commit or stash any changes before updating

when i have updated from version 7 to Angular 8.

Angular Guide for upgrade https://update.angular.io/#7.0:8.0

  D:\app-test> ng update @angular/cli @angular/core                npm cache verify 

Repository is not clean. Please commit or stash any changes before updating.

Update Version

    PS D:\app-test> ng update                 Using package manager: 'npm'                 Collecting installed dependencies...                 Found 58 dependencies.                     We analyzed your package.json, there are some packages to update:                        Name                               Version                  Command to update                      --------------------------------------------------------------------------------                       @angular/cdk                       7.2.2 -> 8.0.1           ng update @angular/cdk                       @angular/core                      7.2.15 -> 8.0.1          ng update @angular/core                       @angular/core                      7.2.2 -> 7.2.15          ng update @angular/core                       @angular/material                  7.3.7 -> 8.0.1           ng update @angular/material                       rxjs                               6.3.3 -> 6.5.2           ng update rxjs                       There might be additional packages that are outdated.                     Run "ng update --all" to try to update all at the same time.                  PS D:\app-test> ng update @angular/cdk                 Repository is not clean.  Please commit or stash any changes before updating. 

i have checked git was not installed in project.

solution that worked

   git commit  

After Googling i have This is happening After Angular 8.

Bug

https://github.com/angular/angular-cli/issues/14600

like image 550
afeef Avatar asked Jun 26 '19 13:06

afeef


People also ask

What is latest version of Angular CLI?

The Angular latest Official stable version is Angular v13. 2.5, which is released on 2nd March 2022.

What does ng update do?

Syntax. ng update command updates the application and its dependencies.


1 Answers

It's a bug in Angular 8

you can work around it by using:

ng update @angular/cli @angular/core --allow-dirty

like image 123
Abdullah Adeeb Avatar answered Oct 14 '22 00:10

Abdullah Adeeb