-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[BUG] Overrides are not updating after running npm install #5443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm seeing this issue on When doing
My
I've also tried:
and,
and even,
with no difference. Another oddity I noticed - if I edit If I change Potentially even worse than this (eg. other than the error on
I may try updating (however this particular dev machine is on |
I can confirm overrides are not working in the currently latest {
"name": "test",
"version": "1.0.0",
"engines": {
"npm": ">=8.3.0"
},
"dependencies": {
"json-server": "^0.17.0"
},
"overrides": {
"json-server": {
"package-json": "7.0.0"
}
}
}
From the above it can be concluded that the |
I was able to fully reproduce @samuliasmala's above repro. Additionally, if I'm not mistaken, it seems like there's no hope for descendants of @-scoped packages. I've certainly been having no luck. As I'm working on proprietary stuff at the moment, I don't have a repro, but I will work to produce one shortly. |
Folks any solution (or hack) for this? This is really blocking our development. |
My only workable solution so far has been to utilize the synp package to export my |
Also encountered this issue. Converting my My current workable solution is to download the tgz file of the package, then revert the version. {
"name": "test",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"dependencies": {
"sails-hook-grunt": "^5.0.0"
},
"overrides": {
"@sailshq/lodash": "3.10.4",
"grunt": "1.5.3"
}
}
...
"dependencies": {
"sails-hook-grunt": "file:/path/to/file/sails-hook-grunt.tgz"
}
...
...
"dependencies": {
"sails-hook-grunt": "^5.0.0"
}
... If I'm not mistaken, we might be able to pinpoint the issue here. Environment
|
Also having problems with overrides here - no matter what I try (clean install, delete package-lock, remove modules etc), the versions in the newly created package-lock file remain the same, and not the versions I choose for overrides. On a side note: I am amazed that this is not a bigger issue for more ppl - how do you manage third party package security issues? Is there perhaps some alternative method to using overrides that allow you to override deep third party dependencies? |
- Fix rotten patches - Remove npm lock file to workaround buggy `overrides`: npm/cli#5443 npm/cli#7660 - Add cargo fetch to `prepare()`
- Fix rotten patches - Remove npm lock file to workaround buggy `overrides`: npm/cli#5443 npm/cli#7660 - Add cargo fetch to `prepare()`
- Fix rotten patches - Remove npm lock file to workaround buggy `overrides`: npm/cli#5443 npm/cli#7660 - Add cargo fetch to `prepare()`
…8160) <!-- What / Why --> Fixes: #7660 #5443 <!-- Describe the request in detail. What it does and why it's being changed. --> Currently overrides are applied correctly to workspaces when a user does their initial `npm install`. However, when a user runs `npm install` again, the overrides are not being respected, and versions that the user has specifically overridden because of vulnerabilities or other reasons, are being installed in the node_modules of those workspaces. This ensures that when a package-lock.json is loaded, the overrides are calculated and applied to the workspaces.
Same, I was able to reproduce this issue
Originally posted by @surbhirverma in #4232 (comment)
This closed issue is not resolved
The text was updated successfully, but these errors were encountered: