-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Usage with yarn workspaces #2
Comments
Thank you for your bug report and your solution, I will look into this before the end of the week! |
@teevik I will add a configuration value to facilitate the usage of workspace but in the meantime what you can do is:
|
Alright, thank you so much! |
Hi! The
|
@axelchalon +1. passing |
I will look into this as soon as possible. Thank you. |
@iamawebgeek @axelchalon could you provide a simple repository that reproduce the case? It works fine with my sandbox project with either the
Thank you |
yes, https://github.com/axelchalon/craco-issue Notice how Some observations: tests work if there is only one test file, and tests work if I remove |
Thank you @axelchalon Oh that explains why, my sandbox project contains a single test file. |
It took a while but I finally found some time to work on this! It was not an easy one. I published an alpha version, if anyone can try it: https://www.npmjs.com/package/@craco/craco/v/4.0.0 The problem was that the The solution is to define those options in the You can have a look here for the config: https://github.com/sharegate/craco/blob/add-paths-to-config-file/packages/craco/README.md#configuration-overview Of course there is some drawback...
|
Can confirm |
The error:
I'm using yarn workspaces for a monorepo, so all the node_modules is shared in a single folder. My app has a structrue like this:
Now the problem is that craco looks for the react-scripts files in
coding-tracker/packages/client/node_modules
instead ofcoding-tracker/node_modules
I'm pretty sure that's because
process.cwd()
would becoding-tracker/packages/client
: https://github.com/sharegate/craco/blob/master/packages/craco/lib/paths.js#L4I made a quick workaround in my case by doing this:
The text was updated successfully, but these errors were encountered: