Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm - tarball data for material-design-icons seems to be corrupted

I'm having this error while running a npm install [email protected]:

tarball data for [email protected] (sha1-mnHEh0chjrylHlGmbaaCA4zct78=) seems to be corrupted
npm ERR! path D:\speech-analytics\node_modules\.staging\material-design-icons-7d5a1f73\action\drawable-xxhdpi\ic_assignment_ind_white_48dp.png
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\\speech-analytics\node_modules\.staging\material-design-icons-7d5a1f73\action\drawable-xxhdpi\ic_assignment_ind_white_48dp.png'
npm ERR!  { Error: EPERM: operation not permitted, unlink 'D:\\speech-analytics\node_modules\.staging\material-design-icons-7d5a1f73\action\drawable-xxhdpi\ic_assignment_ind_white_48dp.png'

Here it's documented as a bug, but still without an answer nor a fix.

I've tried to reinstall node, upgraded to latest npm version (currently running 6.4.1), did a cache clean --force, tried a npm install --no-optional, removed package-lock.json, removed npm & npm-cache folders from AppData directory, running everything as Administrator, but still no luck.

I even tried with [email protected] but the error remains.

If I navigate to the folder that appears in the log (node_modules\.staging\material-design-icons-7d5a1f73\action\drawable-xxhdpi), it's empty, and is the only folder that exists in the entire node_modules directory. I can delete that dir without any problems, so it does not seem to be a permissions/lock issue.

Any suggestions?

like image 480
SebaGra Avatar asked Oct 10 '18 12:10

SebaGra


People also ask

Is tarball data corrupted?

Tarball data seems to be corrupted. Trying one more time #20925 Tarball data seems to be corrupted. Trying one more time #20925 npm is crashing.

What happened to NPM/NPM/GitHub?

Trying one more time · Issue #20925 · npm/npm · GitHub This repository has been archived by the owner. It is now read-only. Tarball data seems to be corrupted.

What happened to tarball?

Tarball data seems to be corrupted. Trying one more time · Issue #20925 · npm/npm · GitHub This repository has been archived by the owner. It is now read-only. Tarball data seems to be corrupted.

Does the NPM install fail after verification?

@legodude17 The install does not fail (sometimes it later will for a different verification error, write after end, etc), but it does make the install take extremely long. Been seeing this for weeks now often times with builds taking over an hour on the npm install step.


2 Answers

Finally, I got this fixed by:

  • Removing node_modules folder
  • Running npm update
  • Running npm install

As far I understand, the npm update should have updated the package.json file, but all dependencies kept the same versions as we had it before.

like image 168
SebaGra Avatar answered Sep 21 '22 11:09

SebaGra


I resolved this with the command: npm cache verify which output:

Cache verified and compressed (C:\Programs\DCPS\npm-cache\_cacache):
Content verified: 1344 (164824963 bytes)
Content garbage-collected: 1 (3491551 bytes)
Index entries: 1522
Finished in 8.187s

The line that stands out to me is: Content garbage-collected: 1 (3491551 bytes)

Does this sort of thing happen because a new version of a package is published to npmjs without a version bump?

like image 36
gforceg Avatar answered Sep 22 '22 11:09

gforceg