diff options
author | 2021-07-27 22:03:53 +0200 | |
---|---|---|
committer | 2021-07-27 16:03:53 -0400 | |
commit | 6c52c92780e7b2860880a4592609414425d86d33 (patch) | |
tree | 2aa56f0f3931fc0d2c7ab622c4ebf6c7f317cc77 /packages/create-astro/src | |
parent | d8cebb0132cab8bfffc6851d2e656a9985bbeddf (diff) | |
download | astro-6c52c92780e7b2860880a4592609414425d86d33.tar.gz astro-6c52c92780e7b2860880a4592609414425d86d33.tar.zst astro-6c52c92780e7b2860880a4592609414425d86d33.zip |
Add warning when encountering 'zlib: unexpected end of file' message (#655) (#889)
* Add warning when encountering 'zlib: unexpected end of file' message
* Add missing import for 'yellow'
* Add changeset
* Changing to a patch change since we are pre 1.0
Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Diffstat (limited to 'packages/create-astro/src')
-rw-r--r-- | packages/create-astro/src/index.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index 4343c243a..1b337a368 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -1,6 +1,6 @@ import fs from 'fs'; import path from 'path'; -import { bold, cyan, gray, green, red } from 'kleur/colors'; +import { bold, cyan, gray, green, red, yellow } from 'kleur/colors'; import fetch from 'node-fetch'; import prompts from 'prompts'; import degit from 'degit'; @@ -120,6 +120,12 @@ export async function main() { } catch (err) { // degit is compiled, so the stacktrace is pretty noisy. Just report the message. console.error(red(err.message)); + + // Warning for issue #655 + if (err.message === 'zlib: unexpected end of file') { + console.log(yellow("This seems to be a cache related problem. Remove the folder '~/.degit/github/snowpackjs' to fix this error.")); + console.log(yellow('For more information check out this issue: https://github.com/snowpackjs/astro/issues/655')); + } process.exit(1); } |