wclr / yalc

Work with yarn/npm packages locally like a boss.
MIT License
5.64k stars 147 forks source link

yalc link across 2 monorepos not working #217

Open mastastealth opened 1 year ago

mastastealth commented 1 year ago

I have:

@project-foo
- package1
- package2

project-bar
- packageA
- packageB

I can publish @project-foo/package1 just fine.

When I do yalc link @project-foo/package1 in project-bar I can see the right files populated in the .yalc folder, however the project-bar/node_modules/@project-foo/package1 does not reflect the version in .yalc, but rather whatever existed before.

I have to manually delete the folder and create the symlink (usually have to cd down to make the symlink ../../.yalc/@project-foo/package1, possible because of #72 ?).

Shouldn't yalc link be doing this for me or am I missing something? If I do yalc add @project-foo/package1 --link this does create the symlink as expected, but adds the (unneeded) entry in package.json as well. Adding --pure doesn't touch package.json but then doesn't give me symlink either! :sweat_smile:

NoahAndrews commented 1 year ago

I also encountered this issue. My equivalent to project-bar is using Yarn 3.2.0.

nkalinov commented 12 months ago