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
What is the current behavior?
In a yarn workspaces monorepo, trying to install handlebars and handlebars-loader with nohoist.
handlebars is installed at packageA/node_modules/handlebars (v4) and packageB/node_modules/handlebars (v1) as expected
handlebars-loader is installed at packageA/node_modules/handlebars-loader as expected
handlebars-loader has its own copy of handlebars (v1, wrong version) at packageA/handlebars-loader/node_modules/handlebars.
Because handlebars-loader has a peer dependency with a very wide range of acceptable versions, it seems to always pick the lower version which is specified in packageB. I tried a variety of things, including setting custom resolution and different nohoist configurations but nothing resolved the issue. Finally my workaround was to fork and remove the peer dependency.
If the current behavior is a bug, please provide the steps to reproduce.
yarn workspaces repo with packageA and packageB
packageA depends on handlebars@1
packageB depends on handlebars@4 and handlebars-loader
yarn install
oberserve handlebars loader load handlebars@1 from packageA/node_modules/handlebars-loader/node_modules/handlebars
What is the expected behavior?
either
peer dependencies should not auto install
or
peer dependencies should only install if an existing dep does not satisfy the requirement
Please mention your node.js, yarn and operating system version.
nodejs v12.6.0
yarn v1.17.3
osx v10.14.5
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?
In a yarn workspaces monorepo, trying to install handlebars and handlebars-loader with nohoist.
packageA/handlebars-loader/node_modules/handlebars
.Because handlebars-loader has a peer dependency with a very wide range of acceptable versions, it seems to always pick the lower version which is specified in packageB. I tried a variety of things, including setting custom
resolution
and different nohoist configurations but nothing resolved the issue. Finally my workaround was to fork and remove the peer dependency.If the current behavior is a bug, please provide the steps to reproduce.
yarn install
packageA/node_modules/handlebars-loader/node_modules/handlebars
What is the expected behavior?
either
or
Please mention your node.js, yarn and operating system version.
nodejs v12.6.0
yarn v1.17.3
osx v10.14.5
The text was updated successfully, but these errors were encountered: