Rich-Harris/degit

`zlib: unexpected end of file`

natemoo-re opened this issue · 1 comments

We're using degit to power create-astro and a number of users have reported that the CLI throws the following error:

zlib: unexpected end of file

It looks like a workaround is to clear the cached files in ~/.degit, but this is confusing because we're explicitly setting cache: false.

I'd be happy to contribute a PR to fix this if I can narrow down the problem!

@natemoo-re degit seems to not be updated anymore. Please checkout tiged which is a community driven fork (maintained by me), which has fixed this "bug" and numerous other issues with degit. It is already used by big projects like nuxt.

https://github.com/tiged/tiged

You can set disableCache: true in tiged or if running from CLI tiged --disable-cache or degit --disable-cache (just uninstall degit first). Tiged should be completely backwards compatible with degit (which is why we did not change the functionality of cache, we will simply deprecate it and rename it to the more sensible offlineMode: true or tiged --offline-mode if using CLI, which is what that functionality actually does.

My hope is that this current version fixes the zlib issue by not using the cached version. Please let me know if you have any issues and submit an issue and I will look into it asap.