Reputation: 179
I want to update my outdated dependencies in Angular 2. when I run npm outdated
, it displayed some outdated dependencies but when I try to update them with npm update
command is not working for me. My npm version is 5.3.0
.
"private": true,
"dependencies": {
"@angular/animations": "^4.3.4",
"@angular/cdk": "^2.0.0-beta.8",
"@angular/common": "^4.3.4",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.3.4",
"@angular/http": "^4.0.0",
"@angular/material": "^2.0.0-beta.8",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"@ngui/tab": "^0.5.0",
"angular-route": "^1.6.5",
"angular2-jwt": "^0.2.3",
"angular2-social-login": "^3.1.1",
"bootstrap": "^3.3.7",
"bootstrap-sidebar": "^0.2.2-retry",
"chart.js": "^2.6.0",
"core-js": "^2.4.1",
"ng2-charts": "^1.6.0",
"ng2-toastr": "^4.1.2",
"ng2-validators": "^2.2.0",
"rxjs": "^5.1.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "1.3.1",
"@angular/compiler-cli": "^4.0.0",
"@angular/language-service": "^4.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~8.0.24",
"codelyzer": "~3.1.2",
"jasmine-core": "~2.7.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.3.0",
"tslint": "~5.6.0",
"typescript": "~2.4.2"
}
}
Thanks!
Upvotes: 2
Views: 3901
Reputation: 3778
you can try this package ...
https://www.npmjs.com/package/npm-check-updates
and then run
ncu -u
then:
DELETE your node_modules folder and reinstall dependencies with npm install
But i suggest to you to be carefully
..cause many times not all dependencies settled to latest version are fine ...
Usually i use VSCODE
which have a nice features ... you can put the cursor on the package in package.json and it gives to you the latest version of the package .. so you can choose manually
Hope it helps you
Upvotes: 2
Reputation: 930
Install package npm-check
, it can be found here:
https://www.npmjs.com/package/npm-check
Then, in your project console type npm-check -u
. It will show you interactive menu and you'll be able to check which packages you want to update.
Upvotes: 1