Same file with XHTML file extension throws exception on pagedjs-cli
pagedjs - v0.2.0 pagedjs-cli - v0.1.3
Same file, one with .html extension, the other with .xhtml extension. The first one runs through the CLI just fine and the output looks ok, the .xhtml file gets such exception and stucks on loading:
$ pagedjs-cli original_with_all_styles_plus_theme.xhtml -o test_xhtml -x
◴ Loading: original_with_all_styles_plus_theme.xhtml(node:25560) UnhandledPromiseRejectionWarning: Error: Evaluation failed: TypeError: Cannot read property 'querySelector' of null
at Previewer.wrapContent (C:\Users\leonas.reckus\AppData\Roaming\npm\node_modules\pagedjs\dist\paged.polyfill.js:32641:20)
at Previewer.preview (C:\Users\leonas.reckus\AppData\Roaming\npm\node_modules\pagedjs\dist\paged.polyfill.js:32694:20)
at async __puppeteer_evaluation_script__:44:14
at ExecutionContext._evaluateInternal (C:\Users\leonas.reckus\AppData\Roaming\npm\node_modules\pagedjs-cli\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:217:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async ExecutionContext.evaluate (C:\Users\leonas.reckus\AppData\Roaming\npm\node_modules\pagedjs-cli\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:106:16)
at async Printer.render (C:\Users\leonas.reckus\AppData\Roaming\npm\node_modules\pagedjs-cli\src\printer.js:191:5)
at async Printer.html (C:\Users\leonas.reckus\AppData\Roaming\npm\node_modules\pagedjs-cli\src\printer.js:353:16)
at async C:\Users\leonas.reckus\AppData\Roaming\npm\node_modules\pagedjs-cli\bin\paged:158:14
(node:25560) 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:25560) [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.
◵ Loading: original_with_all_styles_plus_theme.xhtml
The same file with .xhtml extension worked before recent (0.2.0) pagedjs package update.
Original file: original_with_all_styles_plus_theme.xhtml