Open pilaoda opened 1 year ago
How do you propose this project should work with node_modules install scheme? I don't see any way. So I'd say it is not a bug, but rather a fundamental limitation of the node_modules scheme.
I know it should't work in my case, but it will be helpful if the yarn cli tell me what I done wrong, like showing message about missing dependency or version mismatch. I can never know how to fix the "Error: Assertion failed: Writing attempt prevented" message, until I debug deep in the yarn source code.
I agree, more helpful error message will be appropriate, however it is very difficult to implement the explanation logic for all the cases.
I understand. Thanks for all your hard work. I notice that there is an NM_DEBUG_LEVEL env variable help me find out problem, may be we can write doc about it or try to suggest user set this variable when this assertion failed happen.
@pilaoda Yes, we can definitely make this error message more helpful and providing more hints to the user. NM_DEBUG_LEVEL is not part of the public user interface, it's rather more internal troubleshooting tool.
Check the version of the package between repos, if the linked repo has a higher version that is what caused this issue in my experience
Check the version of the package between repos, if the linked repo has a higher version that is what caused this issue in my experience
It seems for me that just including anything in dependencies
that you also try to link
will ALWAYS fail with this error.
What are we supposed to do about this? There seems to be no way forward.
Hopefully a solution: nmHoistingLimits: workspaces
in .yarnrc.yml
I find the lack of guidance for users upgrading from Yarn 1 to be a major pain. It's like if you're not ready to do things the Yarn 2+ way, you're on your own.
Edit: Nope. Just s*** out of luck I guess.
Why is there no way to limit hoisting to the monorepo? This makes using yarn link
impossible because it always complains with this error due to trying to hoist past the monorepo's boundaries... There's no middleground between workspaces
and none
?
Self-service
Describe the bug
proj2 link monorepo proj1, then show this error
Expect to get more detailed information about how to fix it. After debugging with berry source code, I guess it may relevant to the mismatch version of
fs-extra
and lack oflib-a
dependency in proj2.To reproduce
https://github.com/pilaoda/yarn-bug1
yarn
in proj1yarn
in proj2 It should reproduce this problem.Environment
Additional context
No response