将 angular 7 更新为 angular 8,我成功更新到angular/cli angular/core
使用 command $ ng update @angular/cli@v8 @angular/core@v8
。而且我也使用了角度材料,所以我想更新材料然后我用$ ng update @angular/material@v8
. 但是在运行命令后我得到了Repository is not clean. Please commit or stash any changes before updating.
所以我在更改 git 之前提交,然后我再次尝试使用相同的命令,然后也得到相同的消息。现在没有要提交或存储的文件。
这是package.json
文件的依赖关系:
"dependencies": {
"@angular/animations": "^8.0.0",
"@angular/cdk": "^7.3.7",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/material": "^7.3.7",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"ngx-loading": "^3.0.1",
"rxjs": "6.5.2",
"underscore": "^1.9.1",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.0",
"@angular/cli": "~8.0.2",
"@angular/compiler-cli": "^8.0.0",
"@angular/language-service": "^8.0.0",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"bootstrap-sass": "^3.3.7",
"codelyzer": "^5.0.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-scss-preprocessor": "^3.0.0",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~3.4.5"
}
这是我收到的信息:
D:\test>ng update @angular/material@v8
Repository is not clean. Please commit or stash any changes before updating.
我删除了 node_modules 文件夹并在$ npm install --save
. 安装后我再次尝试,然后也收到相同的消息。
有谁知道,如何更新材料?