You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could just have a bug in my configuration, but nested yarn workspaces seem to result in incomplete dependency installs.
I'm in the process of setting up a meta repo (proteinjs) with git submodules (reflection, util). reflection and util are both workspaces themselves, and leverage yarn for their own build/publish pipelines.
When I run yarn install in proteinjs, dependencies seem to be mapped appropriately across the nested workspaces (verified with yarn workspaces list). However, when I look at the node_modules/ of packages, they seem to be missing local dependencies.
An example of an issue in my workspace hierarchy looks like this:
proteinjs/
package.json
.yarnrc.yml
packages/
reflection/
package.json
.yarnrc.yml
packages/
reflection-build/
node_modules/ <-- missing local dependencies
util/
package.json
.yarnrc.yml
packages/
..
..
To reproduce
git clone --recurse-submodules https://github.com/proteinjs/proteinjs cd proteinjs yarn install yarn workspaces list -v --json
yarn workspaces foreach --all --topological --exclude typescript-parser run build
[@proteinjs/reflection-build-test-b]: Process started
[@proteinjs/reflection-build-test-b]: Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
[@proteinjs/reflection-build-test-b]:
[@proteinjs/reflection-build-test-b]: $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
[@proteinjs/reflection-build-test-b]: Process exited (exit code 1), completed in 0s 479ms
The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph
Failed with errors in 0s 484ms
ls packages/reflection/packages/reflection-build/node_modules
Self-service
Describe the bug
I could just have a bug in my configuration, but nested yarn workspaces seem to result in incomplete dependency installs.
I'm in the process of setting up a meta repo (proteinjs) with git submodules (reflection, util). reflection and util are both workspaces themselves, and leverage yarn for their own build/publish pipelines.
When I run
yarn install
in proteinjs, dependencies seem to be mapped appropriately across the nested workspaces (verified withyarn workspaces list
). However, when I look at the node_modules/ of packages, they seem to be missing local dependencies.An example of an issue in my workspace hierarchy looks like this:
proteinjs/
To reproduce
git clone --recurse-submodules https://github.com/proteinjs/proteinjs
cd proteinjs
yarn install
yarn workspaces list -v --json
yarn workspaces foreach --all --topological --exclude typescript-parser run build
ls packages/reflection/packages/reflection-build/node_modules
Environment
System: OS: macOS 14.4.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Binaries: Node: 20.3.1 - /private/var/folders/x7/2klqb_951nj1yxfyr60hgs080000gn/T/xfs-ee5086da/node Yarn: 4.1.1 - /private/var/folders/x7/2klqb_951nj1yxfyr60hgs080000gn/T/xfs-ee5086da/yarn npm: 9.7.1 - ~/.nvm/versions/node/v20.3.1/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: