Docz: Docz sidebar no longer displays subheaders and closes on click

Created on 23 Jan 2019  Â·  7Comments  Â·  Source: doczjs/docz

I upgraded docz and docz-theme-default recently and the sidebar has since stopped working as it used to.

This is how it looked before:

Image

Now subheaders in the markdown no longer create submenu entries, and additionally, when you click on an item, the whole parent menu closes.

It looks like this:

Image

My docz dependencies are:

    "docz": "^0.13.7",
    "docz-plugin-css": "^0.11.0",
    "docz-theme-default": "^0.13.7",

It's basically the same as #247.

The solution there was to use yarn...Surely I don't have to use yarn just to make docz work?

Most helpful comment

I also encountered this problem when I built the example from the repository without using symlinks (everything is OK with it). Having drunk a fair amount of cups of tea, I discovered the problem in the way to the path-to-regexp library. In one case, the paths went to node_modules/path-to-regexp (0.1.7), and in the other, node_modules/react-router/node_modules/path-to-regexp (1.7.0).
I have a suspicion that using symlinks changes the work of the rezolver (https://github.com/pedronauck/docz/blob/master/packages/docz-core/src/webpack/config.ts#L117).

All 7 comments

I am seeing this issues as well. I tried to use yarn just to see if it fixed it for me, but it didnt. I agree with @regrettably that it should work with npm or yarn.

the resolutions are a bit messy right now unfortunately :( beyond my skill level to help to debug

I also encountered this problem when I built the example from the repository without using symlinks (everything is OK with it). Having drunk a fair amount of cups of tea, I discovered the problem in the way to the path-to-regexp library. In one case, the paths went to node_modules/path-to-regexp (0.1.7), and in the other, node_modules/react-router/node_modules/path-to-regexp (1.7.0).
I have a suspicion that using symlinks changes the work of the rezolver (https://github.com/pedronauck/docz/blob/master/packages/docz-core/src/webpack/config.ts#L117).

Anyone still having this issue? I'm already using yarn on my instance of Docz, but still getting the error... unfortunately I'm limited to version 0.13.7 because I need the hash router :/

We finally managed to fix the issue by doing a fresh install of Docz 0.13.7 (using yarn) without the issue and adding our project dependencies one by one until we found the culprit.

In our case, it was webpack-dev-server, probably conflicting with the way Docz serves the files. Your problem might be different, but I suggest doing the same — fresh install, then re-add your dependencies until you make it work.

@pedronauck but issue is not resolved yet, folks only found a conflict package

@akharkhonov Have a try of docz 1.0. Does this bug still exist in 1.0?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ssylvia picture ssylvia  Â·  3Comments

bichotll picture bichotll  Â·  3Comments

YardWill picture YardWill  Â·  3Comments

regrettably picture regrettably  Â·  3Comments

ilyanoskov picture ilyanoskov  Â·  3Comments