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
yarn install
(cd a && yarn run version)
(cd b && yarn run version)
What is the expected behavior?
In a, yarn run version should report typescript v2.9.2.
In b, yarn run version should report typescript v3.5.3.
What is the current behavior?
In both a and b, yarn run version reports typescript v2.9.2.
ts-node has a peer dependency on typescript, and uses require("typescript") to resolve it. But because with workspaces, ts-node gets hoisted to the top-level node_modules, this will always resolve to the version of typescript that happens to get hoisted, whereas I expect it to resolve to the version that's specified as the peer of the ts-node dependency.
I know I can work around this with nohoist but it seems like I shouldn't have to.
Please mention your node.js, yarn and operating system version.
node.js v10.14.1
yarn 1.17.3
macOS 10.14.5
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
Report a bug.
If the current behavior is a bug, please provide the steps to reproduce.
Clone https://github.com/jfirebaugh/yarn-workspaces-vs-ts-node and run the following commands:
What is the expected behavior?
In
a
,yarn run version
should reporttypescript v2.9.2
.In
b
,yarn run version
should reporttypescript v3.5.3
.What is the current behavior?
In both
a
andb
,yarn run version
reportstypescript v2.9.2
.ts-node has a peer dependency on typescript, and uses
require("typescript")
to resolve it. But because with workspaces, ts-node gets hoisted to the top-levelnode_modules
, this will always resolve to the version of typescript that happens to get hoisted, whereas I expect it to resolve to the version that's specified as the peer of thets-node
dependency.I know I can work around this with
nohoist
but it seems like I shouldn't have to.Please mention your node.js, yarn and operating system version.
node.js v10.14.1
yarn 1.17.3
macOS 10.14.5
The text was updated successfully, but these errors were encountered: