简体   繁体   中英

Install / upgrade all organization / scope (@angular) dependencies in package.json to same version

I currently have this in dependencies in package.json:

"@angular/animations": "^5.0.0",
"@angular/cdk": "^5.2.0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/flex-layout": "^2.0.0-beta.12",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/material": "^5.2.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",

is there some command line option, to bump all of them to v5.2.0 ?

Something like this:

npm install -S @angular/*@5.2.0  # not real, just a guess

Because of version mismatch, there are some errors, I need them to all be at 5.2.0.

you can make it with yarn using this command

yarn upgrade --scope @angular

More info is here

https://yarnpkg.com/en/docs/cli/upgrade#toc-yarn-upgrade-scope-s-scope-latest-pattern

hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM