docz
docz copied to clipboard
Multiple errors after installing docz
Bug Report
Describe the bug
I'm getting multiple errors when following the installation and run instructions in docz documentation.
To Reproduce
- Inside an empty folder, run
yarn add docz react react-dom
- 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"
}
- Run
yarn docz:dev
- See the first error
Error: Cannot find module 'typescript'
- Install Typescript:
yarn add typescript
- Run
yarn docz:dev
again - See error
Can't resolve '@emotion/core' in...
- Install emotion:
yarn add @emotion/core
- Run
yarn docz:dev
again - More errors:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module
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 [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.
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.