afrog
afrog copied to clipboard
Atom should handle corrupted cache situations better "npm ERR! zlib: unexpected end of file"
Hello, good Atom people,
I don't know if this is a bug or a feature request. Or neither.
Some of us ran into this problem where a package would simply not update: https://github.com/braver/fonts/issues/97
Now, it seems like it turned out to be some corrupted cache. Why it became corrupted, I have no idea, but this notification in the debug file hints at something that can be detected by atom's package installer and handled with more care:
Installing “[email protected]” failed.
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! zlib: unexpected end of file
I'm guessing, but Atom could do a number of things perhaps:
- nuke the cache and try again (but you have to be confident that is the right decision).
- nuke the cache specific to the failed install and try again.
- improve the debug log messaging
- pop up a handy little message stating that the package didn't install and maybe, just maybe this will fix you:
npm cache clean --force npm cache verify
Or something along those lines. Or maybe add this to the debugging FAQ?
The long and short of it is that I suspect this can be handled better than a cryptic message in a debug file. Those are some suggestions. I don't know the code, but this bug was rather annoying. :)
Keep up the good work! -t
Thanks for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:
- Verify that you can still reproduce the issue in the latest version of Atom
- Comment that the issue is still reproducible and include:
- What version of Atom you reproduced the issue on
- What OS and version you reproduced the issue on
- What steps you followed to reproduce the issue
Issues that are labeled as triaged will not be automatically marked as stale.
this should probably still be open
This issue not only should be open, it's still ruining some updates that should be automatic. Npm or apm, given enough time something is bound to be corrupted on download and then Atom refuses to update or install the offending packages, forcing manual intervention from the user. A neater way of handling it could be useful.
Two years and no commentary by Atom folks except the stale-bot and folks burnt by this? Come on Atom people. :)
Unfortunately, nowadays any contributions are voluntary and not by the Microsoft team so there's not much work on Atom