Multiple errors after installing docz
Author: lauraceconiCreated Jun 24, 2022Updated Jan 22, 2025
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:devagain - See error
Can't resolve '@emotion/core' in... - Install emotion:
yarn add @emotion/core - Run
yarn docz:devagain - 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
Source: pedronauck/docz