doc-builder icon indicating copy to clipboard operation
doc-builder copied to clipboard

NotFound [Error]: Not found: /

Open kovalexal opened this issue 1 year ago • 7 comments

Hi doc-builder team! Thanks for your great library!

I am trying to use your library to build docs for my own project, but I am facing some difficulties. I have created a file structure for docs similar to what HuggingFace libraries have (_toctree.yml, etc.).

However, when I run doc-builder preview LIBRARY_NAME PATH_TO_DOCS and open web browser, I get a "NotFound [Error]: Not found: /" and web browser shows left side panel with the content from _toctree.yml, but in the center there is a page with 404 error.

At first, I thought that it might be related to some files missing (misconfiguration from my side), so I decided to try and preview docs from peft library and I get the same error when I run doc-builder preview peft /workspaces/peft/docs/source

image image

Then I found issue #456 where they suggested using an older version of doc-builder, so I tried using 0.4.0 and the commits mentioned in that issue and nothing works for me. Do you have any idea how to fix this?

I used the Dockerfile from the peft project and installed nodejs like this:

curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
bash /tmp/nodesource_setup.sh
apt install nodejs -y

kovalexal avatar May 23 '24 09:05 kovalexal

Hey there, it worked on this commit: 3de0a0e

jadechoghari avatar Jun 05 '24 17:06 jadechoghari

Hi @jadechoghari! Thanks for the suggestion, unfortunately it still doesn't work on the mentioned commit.

I used this specific Dockerfile and used the following commands to install everything:

curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt update && apt install gcc g++ make cmake nodejs -y

pip install watchdog
pip install git+https://github.com/huggingface/doc-builder.git@3de0a0e9f824fc50e78c873732ef4a4ebaeb005b
doc-builder preview peft /workspaces/peft/docs/source/

I still get the same error.

kovalexal avatar Jun 11 '24 16:06 kovalexal

@kovalexal , I just reverted to the above commit and worked for me. (exact same error). weird.

jadechoghari avatar Jun 12 '24 05:06 jadechoghari

@jadechoghari Am I correct that you are getting the same error as me?

If not, in what env are you running your commands? Is it inside a docker container or bare system (what OS are you using), what is your node version?

kovalexal avatar Jun 12 '24 10:06 kovalexal

I faced the same issue on MacOS and doc-builder 0.5.0, but I cloned the repository, installed from source, and the 0.6.0.dev0 version worked

owczr avatar Feb 14 '25 18:02 owczr

I faced the same issue on MacOS and doc-builder 0.5.0, but I cloned the repository, installed from source, and the 0.6.0.dev0 version worked

On buntu 22.04 and I installed from source; same 404 error on preview reported here.

evdcush avatar Oct 28 '25 04:10 evdcush

I tried the clone method but still same issue

dushmanta05 avatar Oct 28 '25 10:10 dushmanta05