ulivz / vuepress-plugin-export

Export your VuePress site to a PDF file
MIT License
90 stars 17 forks source link

Does not work under windows (ADDRESS_INVALID) + potential fix #11

Open Dan1ve opened 4 years ago

Dan1ve commented 4 years ago

Hi, first of all, thanks for creating this plugin, it's very useful!

I'm having troubles running the pdf export on Windows, though:

> vuepress export docs

wait Extracting site metadata...
(...)
info Start to generate current site to PDF ...
Error: net::ERR_ADDRESS_INVALID at http://0.0.0.0:8080

I was able to patch this locally by changing this line of the plugin:

await generatePDF(ctx, nCtx.devProcess.port, nCtx.devProcess.host)

to

await generatePDF(ctx, nCtx.devProcess.port, 'localhost')

With this change, the PDF export works. Is there a way to configure the host name with the current release?

Cheers, Daniel

issue-label-bot[bot] commented 4 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

itsxallwater commented 3 years ago

This fix worked for me!