Skip to content

Can't update HD1 dependencies #4113

@davidmehren

Description

@davidmehren

Description

Yarn 1 seemingly breaks when packages rename their dependencies.

Via rimraf, we depend on @isaacs/cliui. This package depends on two versions of string-width simultaneously, see its package.json:

    "string-width": "^5.1.2",
    "string-width-cjs": "npm:string-width@^4.2.0",

string-width 5 is ESM-only, so version 4 is renamed to string-width-cjs. Yarn 1 seems to only support this properly when no yarn.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.

Other people experiencing this issue:

Steps to reproduce

Expected behavior

Install succeeds.

Logs

No response

Config

No response

Your Setup

  • Host OS: Fedora 38
  • NodeJS version: v16.20.0, Yarn 1.22.19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions