防止解决循环依赖性对本地工作空间
我有一个包裹,可以提供基本的公用事业。它在工具上具有DEV依赖性,这有助于构建它。该工具反过来需要包装中的功能。
问题是,在包装的开发过程中,本身的依赖性可以解决到本地工作空间,而不是从注册表中获取它 - 显然是由于两个原因而无法工作的:
- 不是构建的,
- 不是构建版本。碰撞了,但是可能已经有个人的变化
,我不知道为什么首先需要这种行为,但是我如何禁用它,迫使注册表的解决方案,从而获取当前最新发布的版本?
将纱线3.2.0与PNP一起使用(看不到3.2.1的任何相关更改,因此恕我直言无关)
I have a package, which offers basic utilities. It has a dev-dependency on a tool, which helps build it. That tool in turn needs features from the package.
The problem is, that during development of the package, the dependency of itself gets resolved to the local workspace, not fetching it from a registry - which obviously won't work, for two reasons:
- it isn't built
- the version isn't bumped yet, but there may already be breaking changes
Personally, i don't know why this behavior is desirable in the first place, but how do i disable it, forcing a resolution to the registry, fetching the current latest published version?
Using yarn 3.2.0 with pnp (could not see any related changes towards 3.2.1, therefore imho irrelevant)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以通过
enabletransparentWorkspaces禁用该行为:false
in 。经过额外的研究,我发现 yarn-2--berry-npm--协议 - 间距到workspace-resolution ,它链接到相关 github q&amp q&一个给出答案的地方。可悲的是,它从未在Github上接受过,也没有传播到相关的问题上,所以我将其保留在这里。
The behavior can be disabled via
enableTransparentWorkspaces: false
inyarnrc.yml
.After additional research, i found yarn-2-berry-npm-protocol-switches-to-workspace-resolution, which links to a related github Q&A, where the answer is given. Sadly, it never got accepted on github, nor propagated to the related SO question, so i'll keep this one here.