Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli exits if a svelte compiler error occurs #28

Closed
matthew-ia opened this issue Nov 2, 2021 · 1 comment
Closed

cli exits if a svelte compiler error occurs #28

matthew-ia opened this issue Nov 2, 2021 · 1 comment
Labels
enhancement New feature or updates to an existing feature
Milestone

Comments

@matthew-ia
Copy link
Owner

When the svelte compiler throws an error, e.g., an 'unclosed-element' error in the template file, it exists the cayo CLI entirely. It'd be nice if this just let the user know, but kept the server running and continue watching the files.

I think the fix will be something like wrapping the import(...) statements in cayo.js for the template, pages, and cayo components in a try...catch as well as adding some try...catch stuff to renderer and prerender. I fiddled around with it and got it to successfully catch the example error above in the template file, but then there was uncaught errors in renderer (as expected, since template would be undefined if it can't be compiled).

@matthew-ia matthew-ia added bug Something isn't working enhancement New feature or updates to an existing feature and removed bug Something isn't working labels Nov 2, 2021
@matthew-ia matthew-ia added this to the 1.0 milestone Aug 14, 2022
@matthew-ia
Copy link
Owner Author

Fixed in 219ad9b (tagging # 54 was a typo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or updates to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant