使用 yarn 添加 git 存储库导致错误

Adding git repository with yarn results in error

我刚开始学习 yarn 和 npm。

我想使用使我的应用程序崩溃的特定包。我发现了一个项目问题,看起来修复已经实施并与 master 合并。有评论说npm包还没更新

我已经将包添加到我的项目中: 纱线添加反应小部件

我想我可以使用 yarn 通过 git 存储库添加包以获得固定版本。

我要的包裹是 https://github.com/jquense/react-widgets

所以我试过了 纱线添加 https://github.com/jquense/react-widgets.git

我收到错误: 错误包 "undefined@undefined" 没有 "name".

首先,这个错误是我使用 yarn 的问题还是 react-widgets 库的问题?我假设它应该像这样添加它所以如果我错了请纠正我。

此外,我是否可以假设如果有更新的 npm 包,那时候我就可以使用 yarn 进行更新?

现在恐怕做不到了。这个 git repo 实际上是里面的几个包(主包是 here) one repo and root package.json is not valid one - it doesn't have name description and this is fail reason. There is 关于在 yarn 中支持这个的讨论,但它还没有实现(在 npm 中也是如此)。