-
Notifications
You must be signed in to change notification settings - Fork 12k
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
yarn workspaces is not compatible with bazel-managed deps #12736
Comments
Another viable dependency management method for monorepos is to run npm/yarn/pnpm individually for each package and the root of the monorepo. This would also cause issues with Bazel. |
Plan: advertise that yarn workspaces doesn't work. |
Actually, having Bazel lay out its managed dependencies into multiple |
@kyliau could you update the developer doc to explain a bit how contributors and people on the team should treat the package.json file now that we are in a mixed mode? @clydin I think we could discuss not using yarn workspaces. Given our current setup, a third-party dep has to go in two places, so we already broke the one thing we know of that yarn workspaces was helping with. @irengrig this is where we really need Bazel to lay out dependencies inside the project folder, FYI |
workspace support is being tracked/discussed here: bazel-contrib/rules_nodejs#266 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
yarn workspaces lays out
node_modules
in several directories, nested with your source code. It relies on node module resolution semantics of looking for anode_modules
in parent directories when a dependency isnt' resolvedBazel-managed dependencies are in a single node_modules directory that's outside the source code.
We could have multiple bazel-managed node_modules, but would still need each of these to be a complete copy of deps needed for a given binary to run.
The text was updated successfully, but these errors were encountered: