-
Notifications
You must be signed in to change notification settings - Fork 3k
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
npm install removes resolved and integrity properties from package-lock.json if installed from cache #4263
Comments
In my case, it removes the
|
@giovannipds what about with npm v8.5.2? |
@ljharb thanks for interacting. In my case, the issue was in my repository config, it was misconfigured, that's why my npm config set registry #YOUR_COMPANY_REGISTRY_URL |
bring back lost `resolved` and `integrity` properties see: npm/cli#4263 License: (Apache-2.0 AND MIT) Signed-off-by: Oli Evans <oli@tableflip.io>
I managed to get proper
|
Just ran into this issue on Cleared the cache and re-ran |
I encountered the same issue with nodejs |
encountered the same issue with node |
Happened on |
We also get this. Repeatedly. And it breaks our CI. Started after we updated to new versions of node and npm recently I think, but I see others get it on older versions as well. I'm not 100% if that is what cased it, as we have refactored a lot of stuff lately. Only workaround is @vmasek workaround above. Would love to not have to delete |
For those who dislike the idea of unlocking and potentially version-bumping a ton of dependencies by deleting package-lock, here's a variant of the workaround above that seems to have worked for us:
This should preserve the locked versions of any packages that were already installed prior to the corruption of package-lock, while ensuring anything newer based on |
I had this happened to me during npm solving merge conflicts with |
I faced the same problem with node 18.12.1 and npm 8.19.2 |
While this problem persists, npm-lockfile-fix provides an easy way to fix lock files without having to delete & regenerate them. It's less problematic since it doesn't cause any dependency updates. Also it seems that these are duplicates or related issues: #4460 #6301 |
Seeing this with node 20.9.0 and NPM 10.2.1. Workaround from vmasek worked for me, too. |
Also seeing this in node 18.18.2 and npm 9.8.1 |
Caused by an issue of command npm install (see npm/cli#4263). Introduced by commit a841343
Caused by an issue of command npm install (see npm/cli#4263). Introduced by commit a841343
* chore: add sitemap Google search console suggested we do this? No clue if it's a good idea or worth doing. * Include sitemap in layout.astro * chore: run npm upgrade Attempting to appease the npm gods. * workaround npm/cli#4263 * Run npm format
Caused by an issue of command npm install (see npm/cli#4263). Introduced by commit a841343
I wonder if the npm team will ever pick this issue up? It's still happening. |
Has this issue today, solved it with running |
|
|
This might be a dumb suggestion, but couldn't you just ask your developers not to change the |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
If you run npm install with existing package cache inside "node_modules" it creates packages-lock.json without "resolved" and "integrity" properties.
Expected Behavior
"resolved" and "integrity" properties should stay remain after npm install using cache from "node_modules" folder
Steps To Reproduce
1.) Run npm install
2.) package-lock.json is created
3.) node modules are cached inside the project folder under "node_modules" folder
4.) delete package-lock.json and delete one package form "node_modules" folder
5.) Run npm install
6.) package-lock.json is created, but "resolved" and "integrity" properties are removed from each package descriptions inside package-lock.json
Environment
; copy and paste output from `npm config ls` here
The text was updated successfully, but these errors were encountered: