Integrity check failed for node build

I tried to configure netlify for and immediately ran into trouble: netlify fails to verify integrity of one of the dependencies. I have checked and the dependency checksum in my package-lock.json is definitely correct => netlify has a broken cache. A “workaround” that has been suggested here is to remove the package-lock.json from the repo. This is clearly a bad idea since I then I have no reason to believe netlify resolves dependencies in the correct way.

Hi Leif!

We don’t have any cache of dependencies in a way that could lead to such an error, particularly not on a brand new site like yours. Our caching is per-site, so until you have a successful build - no cache. And I see from looking at your build logs that this happened on the first build.

I concur that removing the package-lock.json is an antipattern, but why the error was happening I can’t say - I’d guess that we were really getting a bad version of the package, somehow, from the npm service maybe?

I’d try pinning to your specific version again, and if that still fails, testing using this methodology:

…since you can then “examine” the filesystem in-situ to see more details about what is going on.