-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Gatsby breaks with yarn/lerna workspaces #2135
Comments
I'm seeing this issue as well. Here's my manifestation:
|
It looks like this code loads plugins via |
I have some more details now. Gatsby uses node's The problem is that with yarn workspaces (and hoisted dependencies in general), gatsby may be in ember-cli/ember-cli#7401 seems to be the fix implemented by ember-cli, which encountered a very similar issue. It seems that the And here are some nice docs from lerna that describe caveats of yarn's workspace hoisting technique. |
Super interesting @mickeyreiss-visor! Thanks for the research. Also related is #2831 Let's see if we can get things right for v2! |
there is a nohoist option WIP / RFC for yarn workspaces, that could help I guess yarnpkg/rfcs#86 |
@KyleAMathews I tried to extend the webpack config like this:
where the root of my monorepo (using yarn workspace) is at Yet it did not solve the issue, which is weird as both the |
Any news on this? |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
I am using yarn 1.0.2 and lerna to work with many projects and share library code between them.
This combination of tools hoists non-conflicting dependencies to the project root's
node_modules
folder. Consequently,gatsby
gets hoisted up one level higher than the sub-package'snode_modules
folder, which seems to make gatsby choke.gatsby is in ../node_modules/.bin/gatsby.
The text was updated successfully, but these errors were encountered: