Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

102
Views
How do I force a package sub-dependency version - nodejs

I will try to illustrate my problem in simple terms.

I want to install two plugins, plugin A in version 2.0 and plugin B in version 3.0 . plugin B has plugin A as a sub-dependency with a different version, and that version breaks the build phase of my react application.

Package A@2.0.0

Package B@2.0.0 ---> Package A @3.0.0 (one of the sub-dependencies)

My question is how do I force plugin B to install plugin A with the specified version, or not install it altogether?

Here's my package.json

//my package.json
{
  "package A": "2.0.0",
  "package B": "2.0.0",
  "overrides": {
    "package B": {
      "package A": "2.0.0" //I try to force version 2 but it doesn't work
  }
}

Some things I tried or noticed: Overrides doesn't seem to work on nested dependencies, maybe it works when you try to upgrade, or it's just not possible with the specific package I needed.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Found the answer, I'm using yarn and all I had to do is put "resolutions" instead of "overrides" Now my package json looks like this

//my package.json
{
  "package A": "2.0.0",
  "package B": "2.0.0",
  "resolutions": {
    "package A": "2.0.0"
  }
}

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!