framework: More verbose output in case of an error
- Maizzle Version: 1.4.2
- Node.js Version: 14.7.0
Is it possible to make Maizzle more verbose or introduce a verbose mode? In my opinion it is very hard to understand the stack trace when an error occurs and I am not able to find the exact issue when looking at it.
Example: I made changes to some .html files and did some error I did not see. After a maizzle serve or maizzle build I got the following error, where I cannot see where I made the exact error and what the error actually is. So it is very hard and time consuming for me to debug everything.
Building emails...(node:15140) UnhandledPromiseRejectionWarning: YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key at line 2, column 1:
^
at generateError (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/js-yaml/lib/js-yaml/loader.js:167:10)
at throwError (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/js-yaml/lib/js-yaml/loader.js:173:9)
at readBlockMapping (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/js-yaml/lib/js-yaml/loader.js:1073:9)
at composeNode (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/js-yaml/lib/js-yaml/loader.js:1359:12)
at readDocument (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/js-yaml/lib/js-yaml/loader.js:1525:3)
at loadDocuments (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/js-yaml/lib/js-yaml/loader.js:1588:5)
at load (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/js-yaml/lib/js-yaml/loader.js:1614:19)
at safeLoad (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/js-yaml/lib/js-yaml/loader.js:1637:10)
at parse (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/front-matter/index.js:64:20)
at extractor (/Users/gb/Sandbox/GIT/LAB/send-mail-beta/node_modules/front-matter/index.js:26:12)
(Use 'node --trace-warnings ...' to show where the warning was created)
(node:15140) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15140) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠦ Building emails...
Is there a way to get a better feedback from Maizzle whenthe user did something wrong?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (10 by maintainers)
Both issues are handled in
v2.0.0which will be released soon.You’re not doing anything wrong, keys work both quoted and unquoted in this case.
I just looked into it and it’s an issue with the css-mqpacker library that we’re using for merging media queries - apparently it has some issues with
minqueries. Since this isn’t really necessary with Tailwind, I’ve removed it and just released1.4.3which should fix the issue. Thanks for reporting it!Regarding the original issue, improved error handling is coming in
2.0, which should launch beginning of September 👍