Skip to content

[Bug]: yarn is not following yarn.lock for hoisting - webpack duplicates #27017

Description

@Hotell

Library

not applicable

System Info

not applicable

Are you reporting Accessibility issue?

no

Reproduction

Looks like yarn is not following yarn.lock.

This causes type mismatches and unexpected TS errors.

Bug Description

Discovered in this PR #26928

Actual Behavior

webpack 5 and all its dependencies are duplicated within particular @types/*/node_modules family of packages

yarn.lock excerpt:
yarn.lock excerpt

@types package not hoisting its dependencies:
@types package not hoisting its dependencies

Packages that contain webpack dupes:

  • @types/webpack-hot-middleware@2.25.6
  • @types/webpack-bundle-analyzer@4.4.3
  • @types/circular-dependency-plugin@5.0.5

Expected Behavior

yarn should hoist webpack to root, thus not creating types dupes that are causing issues

Logs

No response

Requested priority

Normal

Products/sites affected

fluent infra

Are you willing to submit a PR to fix?

yes

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions