-
Notifications
You must be signed in to change notification settings - Fork 1
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
Duplicate Reacts due to Lerna Monorepo? #18
Comments
The package structure for this repo is a bit hacky, we have been waiting for a TSDX mono repo template to refactor. Seems almost ready to be tackled: I'm not sure how to address your specific issue other than pointing to a working create react app example:
... I would recommend either copying one of those as a starting point, or using the yarn resolutions suggestion. |
Thanks for reporting! Can you provide steps to reproduce this issue? It is possible that it is related to |
I'm using npm already. I'm trying out the yarn resolution approach - if that doesn't work I'll see if I can provide steps to reproduce - or better yet, you can clone the repo here. But I don't think I've checked in these changes yet. At the moment homebrew update is hogging my CPU at the moment so as soon as that finishes I'll push them. |
Yep... looks like the yarn resolutions solution fixed it! Thanks for the help guys! |
I'm running into the issue with hooks described here - namely that React seems to be having trouble with my hooks, due to multiple versions of React being referenced. I double checked that the first two causes are not at fault - it's not due to calling hooks out of place (I copied your pattern from the metamask demo to be sure), or mismatching versions of react and react-dom (see photo below)
I also ran the check suggested in the Duplicate React section of the page to see if two different versions of React are being called, and it returned false (meaning there are two different versions being called). It seems like there are a few suggested solutions for this:
I'm trying to lean away from the custom webpack config, since I started the project with CRA, and would prefer to avoid ejecting if possible. I'm leaning towards the npm-link-shared solution, since it specifically mentions Lerna. Is there a tried and true solution to this issue?
The text was updated successfully, but these errors were encountered: