Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

91
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda