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 have "@types/node": "^10.12.10" in my devDependencies. Yarn correctly installs @types/node@10.12.29 in node_modules/@types/node, but it also installs @types/node@11.10.4 in the node_modules folder of anything that depends on "@types/node": "*".
There seems to be no way to prevent Yarn from installing these typings for Node v11.
This causes problems, because having multiple versions of the same typings installed really confuses the TypeScript compiler, and since we're using Node v10, we don't want the typings for v11 installed.
If the current behavior is a bug, please provide the steps to reproduce.
Run yarn. Run yarn why @types/node. Notice that it finds multiple versions installed.
Like this:
% yarn why @types/node
yarn why v1.13.0
[1/4] 🤔 Why do we have the module "@types/node"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "@types/node@10.12.29"
info Has been hoisted to "@types/node"
info This module exists because it's specified in "devDependencies".
info Disk size without dependencies: "692KB"
info Disk size with unique dependencies: "692KB"
info Disk size with transitive dependencies: "692KB"
info Number of shared dependencies: 0
=> Found "@types/pg#@types/node@11.10.4"
info This module exists because "@types#pg" depends on it.
info Disk size without dependencies: "712KB"
info Disk size with unique dependencies: "712KB"
info Disk size with transitive dependencies: "712KB"
info Number of shared dependencies: 0
✨ Done in 0.09s.
What is the expected behavior?
Since the 10.x version required by "@types/node": "^10.12.10" should also satisfy the requirement "@types/node": "*", Yarn should only install one copy of @types/node, v10.12.29.
Please mention your node.js, yarn and operating system version.
Node v10.15.2
Yarn 1.13.0
macOS Mojave 10.14.3
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
🐞🐛
What is the current behavior?
I have
"@types/node": "^10.12.10"
in mydevDependencies
. Yarn correctly installs@types/node@10.12.29
innode_modules/@types/node
, but it also installs@types/node@11.10.4
in thenode_modules
folder of anything that depends on"@types/node": "*"
.There seems to be no way to prevent Yarn from installing these typings for Node v11.
This causes problems, because having multiple versions of the same typings installed really confuses the TypeScript compiler, and since we're using Node v10, we don't want the typings for v11 installed.
If the current behavior is a bug, please provide the steps to reproduce.
Check out the Git repo at https://github.com/mikl/yarn-duplicate-versions-problem
Run
yarn
. Runyarn why @types/node
. Notice that it finds multiple versions installed.Like this:
What is the expected behavior?
Since the 10.x version required by
"@types/node": "^10.12.10"
should also satisfy the requirement"@types/node": "*"
, Yarn should only install one copy of@types/node
, v10.12.29.Please mention your node.js, yarn and operating system version.
Node v10.15.2
Yarn 1.13.0
macOS Mojave 10.14.3
The text was updated successfully, but these errors were encountered: