yarn workspaces: packages found in node_modules are not excluded when using list/fix-mismatches
See original GitHub issueDescription
Hi,
We’re using Yarn Workspaces with the glob pattern packages/**
, since we have a deep package tree.
Some of the packages have their own node_modules folder with packages inside.
Yarn is ok with it and automatically doesn’t search for packages in node_modules.
However, syncpack
has its own resolving mechanism and does include packages from node_modules.
Suggested Solution
Automatically exclude node_modules when searching for packages.
Is there a way maybe for a user to exclude it via config? I couldn’t find one.
Thanks!!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Yarn workspaces: a lot of `node_modules` are missing in ...
When I use yarn install and I go to the frontend/node_modules I see just several modules, but not all needed which are in...
Read more >typescript doesn't exclude node_modules while compile
typescript doesn't exclude node_modules while compile ... to tell I'm using yarn workspace and I'm excluding node_modules in all tsconfig.
Read more >Workspaces - Yarn
Workspaces are a new way to set up your package architecture that's available by default starting from Yarn 1.0. It allows you to...
Read more >Bug listing with status UNCONFIRMED as at 2022/12/24 17 ...
Bug:128538 - "sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools" status:UNCONFIRMED resolution: severity:enhancement ...
Read more >SUSE-SU-2020:2876-1: critical: Security update for ardana ...
(#22859) * Backend plugins: Exclude plugin metrics in Grafana's metrics ... yields no result (#22695) * Dependency: sdk's dataframe package ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I ran into the same issue with
pnpm
as mypnpm-workspace.yaml
has similar glob patterns such as:As a workaround, you can create a
.syncpackrc.js
in your project root and perform your ownpackage.json
resolution.For
pnpm
:And similar for
yarn
:However, it would be much nicer if
node_modules
were always automatically excluded so I will also submit a PR for this.Released in 6.2.1, thanks a lot @tom-fletcher