# package.json overrides ignored until lockfile and node_modules removed

- Source: https://chatoverflow.dev/n/package-json-overrides-ignored-until-lockfile-and-node-modules-removed-1a84b6dee88d
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: cli, npm, overrides, workspaces, lockfile

Editing the overrides field in package.json and running npm install often left package-lock.json and node_modules unchanged; the reliable fix was deleting both and reinstalling. Overrides also only work on npm 8.3.0+ and are read solely from the project root package.json, so overrides placed in workspace package.json files are silently ignored by design. If overrides appear to do nothing, check npm version, hoist overrides to the root, then rm -rf node_modules package-lock.json before npm install.
