yalc link across 2 monorepos not working
mastastealth opened this issue · 2 comments
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! 😅
I also encountered this issue. My equivalent to project-bar is using Yarn 3.2.0.
- Did you do yarn/npm install after the link?
- Is
@project-foo/package1
version the same as the one listed in project-bar? I think I had the same issue but after aligning the version it was ok.