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

Error when building pdf with baseUrl parameter #11

Closed
fasolens opened this issue May 24, 2020 · 1 comment
Closed

Error when building pdf with baseUrl parameter #11

fasolens opened this issue May 24, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@fasolens
Copy link

I have set baseUrl: '/docs/' and run the docusaurus-pdf with:
npx docusaurus-pdf from-build build/ docs/Wiki/Main_Page /docs/ --output-file build/img/docusaurus.pdf

When I change baseUrl to '/' and build documentation and then build pdf without baseurl parameter, it works fine.

Error: Loading style from http://127.0.0.1:32831/docs/styles.da06b8e4.css failed
    at DOMWorld.addStyleTag (/home/fasolens/docs/node_modules/puppeteer/lib/DOMWorld.js:307:15)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  -- ASYNC --
    at Frame.<anonymous> (/home/fasolens/docs/node_modules/puppeteer/lib/helper.js:111:15)
    at Page.addStyleTag (/home/fasolens/docs/node_modules/puppeteer/lib/Page.js:429:29)
    at Page.<anonymous> (/home/fasolens/docs/node_modules/puppeteer/lib/helper.js:112:23)
    at /home/fasolens/docs/node_modules/docusaurus-pdf/lib/index.js:161:47
    at step (/home/fasolens/docs/node_modules/docusaurus-pdf/lib/index.js:33:23)
    at Object.next (/home/fasolens/docs/node_modules/docusaurus-pdf/lib/index.js:14:53)
    at fulfilled (/home/fasolens/docs/node_modules/docusaurus-pdf/lib/index.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
@fasolens
Copy link
Author

I have found the solution. The problem is with baseUrl argument. When I write pure docs without slashes it works.

npx docusaurus-pdf from-build build/ docs/Wiki/Main_Page docs --output-file build/img/docusaurus.pdf

@maxarndt maxarndt added the bug Something isn't working label May 24, 2020
@maxarndt maxarndt self-assigned this Jun 25, 2020
aloisklink added a commit to aloisklink/docusaurus-pdf that referenced this issue Jun 26, 2020
This has been fixed already in a previous comment,
but these tests will prove it.

Closes kohheepeace#11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants