This repository was archived by the owner on Mar 16, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/docs/documentation/general Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ name : Usage in monorepo
3+ route : /docs/usage-in-monorepo
4+ parent : Documentation
5+ menu : General
6+ ---
7+
8+ # Implementing in monorepo
9+
10+ When installing Docz in a monorepo environment you might need some extra steps to get everything working correctly.
11+
12+ Let's say we have a lerna monorepo with workspaces defines as: ` packages/**/* ` , in a folder structure it would look like this:
13+
14+ ```
15+ packages
16+ |_ components
17+ |_ portal
18+ |___ package.json
19+ ```
20+
21+ Docz and @foo/component would be a dependency in ` portal/package.json ` . As Docz copies over this package.json to ` portal/.docz/package.json `
22+ you might run into ` error There are more than one workspace with name "@foo/portal" ` . In order to fix this add
23+ a couple lines to your ` portal/package.json ` :
24+
25+ ```
26+ //portal.package.json
27+ {
28+ "private": true,
29+ "workspaces": [
30+ // needed to resolve @foo/components in portal/package.json
31+ "../../packages/**/*",
32+ // needed to resolve @foo/components in portal/.docz/package.json
33+ "../../../packages/**/*"
34+ ]
35+ }
36+ ```
37+
38+ You might need to tweak these paths to match your monorepo structure
You can’t perform that action at this time.
0 commit comments