Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn does not update local dependency

Tags:

I have a local dependency in package.json of the form “pkg”: “file:../pkg”.

How can I convince yarn 1.3.2 to fetch the new content of the pkg to node_modules?

like image 673
user3612643 Avatar asked Nov 06 '17 21:11

user3612643


People also ask

How do you update a dependency with yarn?

If you want to update packages with yarn and update the package. json accordingly, Install syncyarnlock - yarn global add syncyarnlock. Update packages - yarn upgrade or yarn upgrade --latest.

Does yarn upgrade change package json?

If you pass yarn the --latest flag it will update the package. json. NOTE: this will not respect semver and will update to the latest version. Whatever that might be.

How do I install missing dependencies in yarn?

Installing Options There are many options for installing dependencies, including: Installing all dependencies: yarn or yarn install. Installing one and only one version of a package: yarn install --flat. Forcing a re-download of all packages: yarn install --force.


1 Answers

You can upgrade the dependencies with yarn upgrade. If it takes too much time, you can upgrade just certain packages yarn upgrade pkg in your case

like image 128
Sergey Okatov Avatar answered Dec 13 '22 22:12

Sergey Okatov