微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何 Yarn 添加特定的分支/工作区

如何解决如何 Yarn 添加特定的分支/工作区

我分叉了 react-select 来添加一些当前 react-select 没有的功能。我创建了一个分支并将其提交给我的分叉项目。现在,我想使用分叉项目。

我尝试通过以下方式安装分叉的 react-select 存储库,但没有成功。

yarn add @react-select/monorepo@<GithubUsername>/react-select#head=<Name of branch>&workspace=react-select

yarn add @react-select/monorepo@<GithubUsername>/react-select#commit=<commit#>&workspace=react-select

yarn add @react-select/<github url>#head=<Name of branch>&workspace=react-select

我已经用 sshgit+ 试过了。纱线网站说的所有内容以及我得到的只是安装了 react-select,但我没有看到我的分支中的代码更改。

我也尝试安装 monorepo 使用的 react-select 包,但出现以下错误

yarn add react-select@https://github.com/<USERNAME>/react-select/tree/master/packages/react-select

Failed with errors in 0s 290ms
(node:11491) UnhandledPromiseRejectionWarning: Error: react- 
select@https://github.com/USERNAME/react- 
select/tree/master/packages/react-select isn't supported by 
any available resolver

我正在使用 yarn 2.4.2

有人处理过这个问题吗?

除了复制文件夹并从文件路径安装之外还有其他解决方案吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。