docz icon indicating copy to clipboard operation
docz copied to clipboard

Multiple errors after installing docz

Open lauraceconi opened this issue 2 years ago • 11 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

lauraceconi avatar Jun 24 '22 12:06 lauraceconi

Can confirm this issue

Xiphe avatar Aug 02 '22 14:08 Xiphe

I was able to mitigate this problem by installing specific lib versions. So, to properly run docz in development do: yarn add docz [email protected] [email protected] typescript @emotion/[email protected]

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.

lauraceconi avatar Aug 02 '22 15:08 lauraceconi

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

Xiphe avatar Aug 02 '22 16:08 Xiphe

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.

rozzzly avatar Aug 03 '22 09:08 rozzzly

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

pedronauck avatar Aug 03 '22 17:08 pedronauck

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.

Xiphe avatar Aug 03 '22 20:08 Xiphe

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...

calebpanza avatar Aug 19 '22 19:08 calebpanza

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

Xiphe avatar Aug 20 '22 17:08 Xiphe

Would anyone be interested in rebuilding this project?

Xiphe avatar Aug 20 '22 17:08 Xiphe

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

calebpanza avatar Aug 22 '22 15:08 calebpanza

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

Xiphe avatar Aug 22 '22 20:08 Xiphe