doczjs / docz

✍ It has never been so easy to document your things!

Home Page:https://docz.site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple errors after installing docz

lauraceconi opened this issue · comments

Bug Report

Describe the bug

I'm getting multiple errors when following the installation and run instructions in docz documentation.

To Reproduce

  1. Inside an empty folder, run yarn add docz react react-dom
  2. Once the install is finished, add the following scripts to you package.json:
"scripts": {
    "docz:dev": "docz dev",
    "docz:build": "docz build",
    "docz:serve": "docz build && docz serve"
  }
  1. Run yarn docz:dev
  2. See the first error Error: Cannot find module 'typescript'
  3. Install Typescript: yarn add typescript
  4. Run yarn docz:dev again
  5. See error Can't resolve '@emotion/core' in...
  6. Install emotion: yarn add @emotion/core
  7. Run yarn docz:dev again
  8. More errors: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module
    image

image

Expected behavior

To run yarn docz:dev and yarn docz:serve without errors.

Environment

  • docz version: 2.4.0
  • OS: OSX 12.3.1
  • Node/npm version: Node v14.18.3/npm 6.14.15

Can confirm this issue

I was able to mitigate this problem by installing specific lib versions. So, to properly run docz in development do:
yarn add docz react@16.8.0 react-dom@16.8.0 typescript @emotion/core@10.1.1

Then add the scripts in your package.json:

"scripts": {
  "docz:dev": "docz dev",
  "docz:build": "docz build",
  "docz:serve": "docz build && docz serve"
}

And run yarn docz:dev. Now you can navigate to localhost:3000 to see it running.

Ah thanks! I eventually gave up on docz and am evaluating https://github.com/facebook/docusaurus now

Ah thanks! I eventually gave up on docz and am evaluating https://github.com/facebook/docusaurus now

Same. Docz appears to be dead/unmaintained. Numerous issues (#1719, #1731, #1674) where the "fix" is to pin some dep like a 2019 react release isn't a real solution. To be fair, a large part of this is because of upstream issues with various deps.

#1634 appears to indicate one of the maintainers is no longer active. I would suggest adding a note at the top of the README.md making it clear that there's not active development. It took me a few hours of tinkering trying to resolve these issues to come to this conclusion. I would have appreciated knowing that before it got started.

@renatobenks is the actual maintainer of the project guys, he can talk better about maintaining

Thanks @pedronauck and big thanks anyone who put work into this project. I know the burden of keeping stuff up to date and running myself.

Wondering if there's any update on this. Trying to avoid using Storybook if possible cause it can be such a headache. I LOVE the setup of docz but won't be able to use it if this problem persists...

Hey @calebpanza 👋 as mentioned above, you might want to give docusaurus a shot. Or react styleguidist

Would anyone be interested in rebuilding this project?

@Xiphe have you used Docusaurus on a React Native project? How was the experience? I'm trying to avoid Storybook if possible. Lol

No, have not used Docusaurus in production yet. But it sticked out when I was researching alternatives to storybook and docz.