I want to update all my packages to the latest version:
npm outdated
Result:
Package Current Wanted Latest Location
cordova 3.4.0-0.1.0 3.6.3-0.2.13 3.6.3-0.2.13 cordova
commander 2.0.0 2.0.0 2.3.0 npm-check-updates > commander
async 0.2.10 0.2.10 0.9.0 npm-check-updates > async
semver 2.2.1 2.2.1 4.0.3 npm-check-updates > semver
read-package-json 1.1.9 1.1.9 1.2.7 npm-check-updates > read-package-json
npm 1.3.26 1.3.26 2.1.2 npm-check-updates > npm
How can I do that?
I tried it:
sudo npm update -g cordova
And this too with no errors:
npm install npm-check-updates
But it's not working.
Thanks!!
If you still want to update everything to the latest version, you can use the tool npm-update-all . It's as easy as running this command in your project folder. As you can see, npm-update-all will update all your packages to the latest version.
The good news is that you can have it done directly via NPM! What can be done in this case is an idea called "package alias". So you can have multiple versions of the same package running in your app and you can work on the upgrades mitigating possible issues.
npm can! For example, we will update cordova to the latest version:
sudo npm install -g cordova@latest
To update npm, just do the same:
sudo npm install -g npm@latest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With