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
string-width 5 is ESM-only, so version 4 is renamed to string-width-cjs. Yarn 1 seems to only support this properly when noyarn.lock is present. On every install attempt after the lockfile is created, Yarn 1 incorrectly hoists the more recent (ESM-only) version to the root of node_modules, which breaks imports from Common JS modules.
Yarn also complains about packages wanting to write to the same directory.
Description
Yarn 1 seemingly breaks when packages rename their dependencies.
Via
rimraf
, we depend on@isaacs/cliui
. This package depends on two versions ofstring-width
simultaneously, see itspackage.json
:string-width
5 is ESM-only, so version 4 is renamed tostring-width-cjs
. Yarn 1 seems to only support this properly when noyarn.lock
is present. On every install attempt after the lockfile is created, Yarn 1 incorrectly hoists the more recent (ESM-only) version to the root ofnode_modules
, which breaks imports from Common JS modules.Yarn also complains about packages wanting to write to the same directory.
Other people experiencing this issue:
Steps to reproduce
node_modules
andyarn.lock
yarn install
and observe successnode_modules
againyarn install
and observe brokennessExpected behavior
Install succeeds.
Logs
No response
Config
No response
Your Setup
The text was updated successfully, but these errors were encountered: