1

I forked react-select to add a couple of features that the current react-select doesn't have. I created a branch and committed it to my forked project. Now, i want to use the forked project.

Ive tried installing the forked react-select repo the following ways with out success.

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

I've tried it with ssh, with git+. with everything that the yarn website says and all i get is react-select installed but i don't see the code changes thats in my branch.

I've also tried to install the react-select package that the monorepo uses, but i get the following error

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

i am using yarn 2.4.2

Has anyone dealt with this?

Any solution besides just copying the folder and installing it from a file path?

RobC
  • 22,977
  • 20
  • 73
  • 80
Hector
  • 6,625
  • 3
  • 16
  • 18

1 Answers1

2

I had the same issue but upgrading to yarn version 2 worked. The following syntax for adding workspaces only starts working from yarn 2 on:

yarn add @react-select/monorepo@<GithubUsername>/react-select#head=<Name of branch>&workspace=react-select
B. Ollog
  • 61
  • 3