Skip to content

Commit e4af0ea

Browse files
agatha197claude
andcommitted
docs(FR-2912): add "docs-toolkit: not found" troubleshooting note to README
New clones / git worktrees run `pnpm install` before the toolkit's `dist/cli.js` exists, so pnpm skips creating the `docs-toolkit` bin symlink and every `docs-toolkit ...` script fails with `not found`. Document the cause and the `pnpm --filter <docs-pkg> rebuild` fix (since `pnpm install`/`--force` report "Already up to date" and skip bin-linking). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 459ade2 commit e4af0ea

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

packages/backend.ai-docs-toolkit/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@ pnpm build:web
1818

1919
> See the example's [`README.md`](../backend.ai-docs-toolkit-example/README.md#using-the-example-outside-this-monorepo) for the standalone-repo recipe (the `pnpm --filter` build step needs to be replaced).
2020
21+
### Troubleshooting: `docs-toolkit: not found`
22+
23+
`docs-toolkit` is the `bin` of this workspace package. pnpm creates the `node_modules/.bin/docs-toolkit` symlink **at install time**, and only if the toolkit's compiled entrypoint (`dist/cli.js`) already exists. In a fresh clone or new git worktree, `pnpm install` usually runs *before* the toolkit is built, so pnpm skips the symlink. Building the toolkit afterwards (`pnpm --filter backend.ai-docs-toolkit build`) produces `dist/cli.js` but does **not** re-link the bin — so every `docs-toolkit …` invocation (including the `preview:html`, `build:web`, `serve:web` scripts) fails with `docs-toolkit: not found`.
24+
25+
A plain `pnpm install` (even `pnpm install --force`) reports *"Already up to date"* and skips bin-linking, so it does not fix this. Re-link the bin by rebuilding the **consumer** package that depends on the toolkit:
26+
27+
```bash
28+
# from the monorepo root — replace the package name with your docs package
29+
pnpm --filter backend.ai-webui-docs rebuild
30+
```
31+
32+
Verify the command resolves:
33+
34+
```bash
35+
pnpm --filter backend.ai-webui-docs exec docs-toolkit --help
36+
```
37+
2138
## Quick Start
2239

2340
```bash

0 commit comments

Comments
 (0)