yalc icon indicating copy to clipboard operation
yalc copied to clipboard

`yarn` in a dependent doesn't pick up on dependency package.json additions

Open olets opened this issue 5 years ago • 1 comments

When I add a new dependency to my local pacakge, and update it in the yalc store, running yarn in dependent projects doesn't install the new dependencies. npm install on the other hand does pick up on the changes.

This may be a bug in how Yarn looks for changes, but since I've only seen this bug when using yalc I figured I'd bring it up here first.

In the below code I use yalc push, but I do get the same result with yalc publish + yalc update

my-package$ npm i some-dependency

my-package$ yalc push

my-package$ cd my-project

my-project$ yarn install
yarn install v1.15.2
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 2.28s.

my-project$ ls node_modules | awk '/my-package/'
# **note no hit**

my-project$ npm i
# npm install output...
removed 21 packages, updated 1 package and audited 15404 packages in 31.771s
# **note the "1 updated package"**
# npm install output...

my-project$ ls node_modules | awk '/my-package/'
my-package

olets avatar Jun 25 '19 00:06 olets

How did you add my-package to my-project?

wclr avatar Jun 25 '19 13:06 wclr