[Bug?]: Mono repo and peerDependency : doesn't provide <pkg> , requested by <pkg> #6468
Labels
bug
Something isn't working
stale
Issues that didn't get attention
waiting for feedback
Will autoclose in a while unless more data are provided
Self-service
Describe the bug
When running
yarn
to install dependency, yarn is emitting a warning that package is not provided, while it is apeerDependency
and should be provided also indevDependency
.However, when I provide the
peerDependency
indevDependency
, as I am in a mono repo lerna, it appears that some dependency get installed at the workspace level in another node_modules, which cause typescript compilation error.Thus, I had to remove them from dependency so they do not get downloaded multiple time
To reproduce
Create a mono repo
error TS2322: Type 'import("/home/dka/workspace/project/packages/utilities/node_modules/ethers/lib.commonjs/providers/network").Network' is not assignable to type 'import("/home/dka/workspace/project/node_modules/ethers/lib.commonjs/providers/network").Network'.
Environment
yarn dlx -q envinfo --preset jest System: OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm) CPU: (4) x64 AMD Ryzen 9 7940HS w/ Radeon 780M Graphics Binaries: Node: 20.10.0 - /tmp/xfs-f4424100/node Yarn: 4.3.1 - /tmp/xfs-f4424100/yarn npm: 10.5.0 - ~/.nvm/versions/node/v20.10.0/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: