1

I am trying to update dependency of package I am installing trough npm.

When I install appium package, I get version 1.22.0 which is correct. But this package also have dependencies that getting regular updates on github and are propagated on npmjs.

But when I install main package, dependency is not latest.

For example, I need to update appium-espresso-driver dependency of appium to 1.50.1, but everytime I install appium, dependency is only 1.45.3, even when appium have ^1.0.0 in package.json

How to update this? Do I need to wait for appium package to be bumped?

1 Answer 1

3

If you want to update all the packages to the latest version and you are using npm, you can see this documentation npm-update, but the short answer is:

npm update

This helps to update every package of the project, you can do it in the root folder, and update everything in the package.json.

If you want to update everything to a latest version, you can use npm-check-updates, this will check the latest version of the packages that you have installed on package.json, I will show you the easy steps to install this but you can go through the documentation of the module in here:

  • npm install -g npm-check-updates

This will install you the package, then after that you need to run in in the root folder:

  • ncu -u

So after that command it will update all the packages in the package.json but not install them, so after running ncu -u you need to run again:

  • npm install

To install the new versions of the package.

Sign up to request clarification or add additional context in comments.

6 Comments

Also if you are using yarn in the future (because is a lot better to work with), you have this link: classic.yarnpkg.com/lang/en/docs/cli/upgrade
I tried that.. It does not work.. Package's dependencies are still same...
If you want to update everything to be UPDATED to a stable version, you should use always npm update, I didn't get what you were saying, now I get it because you want to update to the latest version, you can check again my comment, I will edit it, this will update everything to the latest version (not stable), just latest.
I was checking also the versions of that package, and I don't see any version of 1.50.1, but I saw the npm i [email protected] this should be the latest version but is still in beta
It is package appium-espresso-driver what is dependency of appium. Thats what got updated and what I need to get.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.