如何弄清楚为什么在Yarn3 Monorepo中不悬挂包装?
我正在使用纱3
monorepo,由于某些原因,react> react-dom
软件包未正确悬挂: 相同版本的react-dom
在包装之间重复。
qnm react-dom
react-dom 18.1.0 ↰ 18 hours ago
├── 16.14.0 ⇡ 1 year ago
└─┬ package-a
└── 16.14.0 ⇡ 1 year ago
我在root软件包中有下一个决议
"resolutions": {
"react": "^16.14.0",
"react-dom": "^16.14.0",
...
}
。 似乎一切都是react
的正确且引起的版本
npm info [email protected] peerDependencies
{ react: '^16.14.0' }
但是, ,这无济于事。
您能否建议使用YARN 3
进行任何工具或方法如何调试为什么不悬挂软件包?
I'm using yarn 3
monorepo and for some reason, react-dom
package is not hoisted properly:
The same version of react-dom
is duplicated across packanges.
qnm react-dom
react-dom 18.1.0 ↰ 18 hours ago
├── 16.14.0 ⇡ 1 year ago
└─┬ package-a
└── 16.14.0 ⇡ 1 year ago
I have the next resolutions in root package.json
"resolutions": {
"react": "^16.14.0",
"react-dom": "^16.14.0",
...
}
I read that package could be prevented from hoisting because of wrong peer dependencies,
but seems that everything is a correct and hoisted version of react
is meeting the peer dependency requirement of react-dom
:
npm info [email protected] peerDependencies
{ react: '^16.14.0' }
Also, I've trying to do yarn dedupe
and it's not helping.
Can you suggest any tool or approach how to debug why a package is not hoisted, with yarn 3
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论