Hey there, I'd like to know if a feature to get logs during a nuxt generation of pages, like a log file, could be done. I have a really generic error in my project (I use Nuxt and Storyblok) when I generate my project, see the image below
And there's no way to get more information about those type of errors ,and I found nothing through the docs and the web... So could it be possible to get more informations for these generical errors ? Are they critical ? Could there be a way to log those errors ?
I already asked this as a question on the cmty app, but got no answer
Thanks!
Get more informations on every type of errors during nuxt generate
generate:routeCreated to receive an error immediately when it occured orgenerate:done, this is called after all routes have been generated and receives a list of all errorsIf you use these hooks to log the errors with consola, then you can eg add stdin/stderr to a log file or you can add a consola reporter which logs to a file.
Hey @pimlie , thanks to your steps I catched the error I was looking for, and it is now working fine during generation, thanks a lot!
The error I catched with the hook generate:routeCreated is the following: HTML minification failed. Make sure the route generates valid HTML.
And the solution for my original error is this way, as simple as it is...
Thanks again!
Most helpful comment
You can hook into either
generate:routeCreatedto receive an error immediately when it occured orgenerate:done, this is called after all routes have been generated and receives a list of all errorsIf you use these hooks to log the errors with consola, then you can eg add stdin/stderr to a log file or you can add a consola reporter which logs to a file.