Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

153
Visualizações
Override NPM package with another package entirely

According to the official NPM docs, overrides in package.json allows for overriding a package with another package entirely:

Overrides provide a way to replace a package in your dependency tree with another version, or another package entirely. These changes can be scoped as specific or as vague as desired.

https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

However, I can't figure out how to replace a package with anything other than a changed version of the same package.

I'm trying to replace node-sass with sass in a transitive dependency but no configuration that I've tried works.

"overrides": {
  "node-sass": "sass@^1.3.0"
}

"overrides": {
  "node-sass": {
    ".": "sass@^1.3.0"
  }
}

Either of the above configuration produces the following NPM error:

Invalid tag name "sass@^1.3.0": Tags may not have any characters that encodeURIComponent encodes.

If I try something more rudimentary:

"overrides": {
  "node-sass": "sass"
}

NPM errors with:

No matching version found for node-sass@sass.

I'm on NPM v8.3.1.

Is it actually possible to replace a package with another package entirely or am I misunderstanding what's written in the docs?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda