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

160
Views
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
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!