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: HTTPError: Response code 404 (Not Found) #89

Open
beniroquai opened this issue Aug 21, 2024 · 1 comment
Open

Error: HTTPError: Response code 404 (Not Found) #89

beniroquai opened this issue Aug 21, 2024 · 1 comment

Comments

@beniroquai
Copy link

Similar to #1 I also get this error on multiple different Docusaurus instances. I don't know what's the reason for this. Is there a specific setting I would need to perform in the configuration (certain link to the /docs folder?)

Error:

(base) Blynk:prince-15.4-macos bene$ npx docusaurus-prince-pdf -u http://openuc2.github.io/docs --trace-warnings
(node:85062) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
file:///Users/bene/.npm/_npx/85d58867f08057bf/node_modules/docusaurus-prince-pdf/index.js:175
    throw new Error(err);
          ^

Error: HTTPError: Response code 404 (Not Found)
    at file:///Users/bene/.npm/_npx/85d58867f08057bf/node_modules/docusaurus-prince-pdf/index.js:175:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async requestPage (file:///Users/bene/.npm/_npx/85d58867f08057bf/node_modules/docusaurus-prince-pdf/index.js:136:3)

Node.js v20.12.0

The docusaurus page refers to https://openuc2.github.io/docs/intro, but even using this link in the docusaurus-prince-pdf doesn't resolve the issue. Same with a freshly generated local copy of docusuaurs 3.5 does not work. I think I'm missing something. Thanks!

@sparanoid
Copy link
Contributor

sparanoid commented Jan 15, 2025

The base URL (-u) you pass must be the first page of your docs which has consistent next pagination link.

In your example:

image

You choose https://openuc2.github.io/docs/intro as the base URL but it is the last page of your docs. There is no "next" link on this page so 404 occurred.

You can either:

  • Make the intro page the first page of your docs if you're the docs owner
  • Pass the first page of the docs as base URL. Should be https://openuc2.github.io/docs/General/ModuleDeveloperKit/ in this case
  • Manually create the list file then generate the PDF with --pdf-only flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants