[BUG] Overrides are not updating after running npm install
Open
Nobody has claimed this yet.
Bug
Needs Triage
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
npm 11.x does not install overrides. npm 10.x is working fine.
Expected Behavior
npm 11.x installs overrides.
Steps To Reproduce
sudo npm i -g npm@10
npm upgrade
# Overrides properly installed
sudo npm i -g npm@11
npm upgrade
# Overrides completely ignored and rolled back
In my config I am trying to override a dependency from a older package from nan 2.19.* to nan 2.23.*, but the overriding version is not getting installed
{
"name": "homebridge-virtual-accessories",
"displayName": "Virtual Accessories for Homebridge",
"type": "module",
"version": "3.11.9-beta.3",
"description": "Virtual HomeKit accessories for Homebridge.",
"author": "justjam2013",
"license": "MIT",
"funding": [
{
"type": "kofi",
"url": "https://ko-fi.com/justjam2013"
}
],
"homepage": "https://github.com/justjam2013/homebridge-virtual-accessories#readme",
"repository": {
"type": "git",
"url": "https://github.com/justjam2013/homebridge-virtual-accessories.git"
},
"bugs": {
"url": "https://github.com/justjam2013/homebridge-virtual-accessories/issues"
},
"keywords": [
"homebridge",
"homebridge-plugin",
"plugin",
"homebridge plugin",
"virtual",
"virtual accessory",
"virtual accessories",
"battery",
"door",
"virtual door",
"doorbell",
"virtual doorbell",
"fan",
"virtual fan",
"filter maintenance",
"filter",
"garage door",
"virtual garage door",
"heater",
"virtual heater",
"thermostat",
"virtual thermostat",
"cooler",
"virtual cooler",
"air conditioner",
"virtual air conditioner",
"humidifier",
"virtual humidifier",
"dehumidifier",
"virtual dehumidifier",
"lightbulb",
"virtual lightbulb",
"dimmer",
"virtual dimmer",
"lock",
"virtual lock",
"security system",
"virtual security system",
"speaker",
"virtual speaker",
"tv",
"television",
"virtual tv",
"virtual television",
"valve",
"virtual valve",
"irrigation",
"shower head",
"water faucet",
"window",
"virtual window",
"window covering",
"virtual window covering",
"blinds",
"virtual blinds",
"shades",
"virtual shades",
"switch",
"virtual switch",
"stateful switch",
"delay",
"timer",
"sensor",
"virtual sensor",
"ping",
"cron",
"sunrise",
"sunset",
"golden hour",
"dummy",
"webhook"
],
"main": "dist/index.js",
"engines": {
"node": "^18 || ^20 || ^22 || ^24",
"homebridge": "^1.8.0 || ^2.0.0-beta.0"
},
"scripts": {
"build": "rimraf ./dist && tsc",
"lint": "eslint . --max-warnings=0",
"prepublishOnly": "npm run lint && npm run build",
"watch": "npm run build && npm link && nodemon"
},
"dependencies": {
"@js-joda/core": "^5.6.5",
"@js-joda/timezone": "^2.22.0",
"@types/express": "^5.0.3",
"croner": "^9.0.0",
"express": "^5.1.0",
"homebridge-lib": "^7.1.4",
"net-ping": "^1.2.4",
"reflect-metadata": "^0.2.2",
"typeserializer": "^0.2.5"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
"@types/node": "^24.0.3",
"eslint": "^9.21.0",
"homebridge": "^2.0.0-beta.0",
"nodemon": "^3.1.9",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.1"
},
"overrides": {
"net-ping": {
"raw-socket": {
"nan": "2.23.*"
}
}
}
}
Environment
- npm: 11.6.1
- Node.js: 24.11.0
- OS Name: macOS Sequoia 15.4.1 (24E263)
- System Model Name: Apple, MacBook Air, M1
- npm config:
; "builtin" config from /opt/homebrew/Cellar/node@24/24.11.0/lib/node_modules/npm/npmrc
prefix = "/opt/homebrew"
; "user" config from /Users/renzozanelli/.npmrc
//registry.npmjs.org/:_authToken = (protected)
; node bin location = /opt/homebrew/Cellar/node@24/24.11.0/bin/node
; node version = v24.11.0
; npm local prefix = /Users/renzozanelli/Documents/Homebridge/node-net-ping
; npm version = 11.6.1
; cwd = /Users/renzozanelli/Documents/Homebridge/node-net-ping
; HOME = /Users/renzozanelli
; Run `npm config ls -l` to show all defaults.
; "publishConfig" from /Users/renzozanelli/Documents/Homebridge/node-net-ping/package.json
; This set of config values will be used at publish-time.
access = "public"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the npm 10.x versus 11.6.1 behavior with the provided package.json overrides and the net-ping/raw-socket/nan dependency chain. Trace npm's override and upgrade handling to determine why nan 2.23.* is rolled back; done means npm 11 installs the configured override consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100