-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npx create-react-app throws error when using in monorepo #5195
Comments
Yeah, we can probably fix this. For now, just use your workaround. Thanks for the report! |
May I ask how you created the mono repo? I have been trying to share some ui components between two projects using a mono repo. Only I haven't been able to get it working: https://github.com/weyert/monorepo Does anyone know a good example of CRA2 with code sharing? I can find a bunch of repos on Github but they seem to depend on the now dropped monorepo support in CRA2 |
@weyert Check out my example repo https://github.com/FelixKuehl/cra-monorepo If you need more details, take a look at the readme in my repo and checkout my original Issue regarding dropped monorepo support in CRA 2 stable: #5100 Hope that helps! |
#3967 is a fix for this issue, but it needs to be rebased. |
Thanks @FelixKuehl I am going to have a closer look at your repo :) |
Is this a bug report?
Maybe.
I know monorepos are not fully supported, however i would expect this to work.
Did you try recovering your dependencies?
Yes
Environment
Node v8.11.3
yarn 1.10.1
npx 6.4.1
Steps to Reproduce
(Write your steps here:)
create-react-app@next --scripts-version=@next cra-app
Expected Behavior
It should create a new create react app.
Actual Behavior
When running
create-react-app@next --scripts-version=@next cra-app
, I am getting the following error:This could maybe due to yarn workspaces package hoisting.
Workaround is to just run
create-react-app@next --scripts-version=@next cra-app
outside the monorepo, then delete the node_modules folder and copy the new app into the monorepo.Anyways, keep up the great work! ;)
The text was updated successfully, but these errors were encountered: