Skip to content

Revisit --legacy-peer-deps in our package.json aka Remove --legacy-peer-deps from npm install #2038

@Tatsinnit

Description

@Tatsinnit

Why this change?

  • Avoids bypassing peer dependency validation
    The --legacy-peer-deps flag ignores peer dependency conflicts, which can hide real compatibility issues between packages.

  • Improves dependency correctness
    By allowing npm to enforce peer dependency rules (as intended in npm v7+), we ensure that all installed packages are compatible with each other.

  • Prevents hidden runtime issues
    Ignoring peer dependencies can lead to subtle bugs at runtime that are harder to debug later.

  • Aligns with modern npm best practices
    The flag is meant as a temporary workaround and not recommended for long-term use.

📌 Work Item: Remove legacy peer deps workaround

Remove --legacy-peer-deps and fix dependency tree properly

Description

Currently, the project uses --legacy-peer-deps during npm install, which bypasses peer dependency validation.

This creates a risk of:

  • Installing incompatible package versions
  • Masking underlying dependency issues
  • Introducing runtime instability

Goals

  • Remove reliance on --legacy-peer-deps
  • Ensure a clean and valid dependency tree
  • Align all peer dependencies correctly

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions