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

Twig syntax errors are not throwing exceptions #628

Open
HakS opened this issue Nov 7, 2019 · 1 comment
Open

Twig syntax errors are not throwing exceptions #628

HakS opened this issue Nov 7, 2019 · 1 comment

Comments

@HakS
Copy link
Contributor

HakS commented Nov 7, 2019

kalastatic.build() promise doesn't seem to be returning any TwigException as an error or exception, so it seems to continue trying to render flawed twig files even after Twig.js is displaying syntax errors, which makes it generate even more runtime errors that eventually breaks the browsersync instance

I have Kalastatic running in a custom Node JS command rather than using the kalastatic bin file, however a lot of this code is based on yours (runs kalastatic.build(), when this promise finishes, browsersync watches files, when it detects a change, kalastatic.build() is called again, and here is when this happens)

Please let me know if this is actually an error from Twig or from any of Metalsmith transformers so this ticket gets reported there

@RobLoach
Copy link
Contributor

RobLoach commented Dec 3, 2019

Similar things happen with SASS too. Would love better error reporting. I believe it's in metalsmith-jstransformer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants