Files
dex/docs/package.json
T
zeekayandHanzo Dev 98338a6c5e fix(docs): finish the half-done migration — dex docs could not install or build
The docs job died at INSTALL, before any of the rest was visible:

    postinstall: hanzo-mdx
    Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@hanzo/docs-core'

This package was mid-migration to the @hanzo toolchain and several pieces were
simply never finished. Each one only became visible once the one before it was
fixed, so they are listed in the order they surfaced:

1. @hanzo/docs-core undeclared — @hanzo/mdx imports it, so postinstall crashed.
2. `hanzo-mdx` with NO ARGUMENTS reports "generated files" and writes nothing.
   It needs `source.config.ts .source`, the form luxfi/consensus uses. Both the
   build and postinstall scripts were bare.
3. zod ^3 — @hanzo/mdx 14.2.x calls `z.looseObject`, which is zod 4:
   `TypeError: z.looseObject is not a function`. Nothing in docs/ imports zod
   directly (0 files), so it exists only for this toolchain; moved to ^4.2.1,
   matching mpc which runs the same generator.
4. `import { docs } from "@/.source"` is a DIRECTORY import and the generator
   emits no index — it writes browser/dynamic/server.ts. Now "@/.source/server".
5. @hanzo/docs undeclared — next.config.mjs imports @hanzo/docs/mdx/next.
6. app/global.css imported `fumadocs-ui/style.css`, an upstream package that is
   not a dependency here. Now @hanzo/docs-ui/style.css, as consensus has it.
7. RootProvider, DocsLayout, DocsPage and defaultMdxComponents were imported
   from `@hanzo/ui`, which exports NONE of them — checked at runtime, all five
   names including `loader` come back undefined. That is the
   "Element type is invalid … got: undefined" build failure. They live in
   @hanzo/docs-ui, where consensus already gets them.
8. docs.toFumadocsSource() does not exist on the @hanzo runtime; loader now
   comes from @hanzo/docs/core/source with toSource().
9. react-day-picker, react-resizable-panels and flexsearch were undeclared
   peers. PINNED to what @hanzo/ui asks for (^9, ^2) — installing latest gives
   react-resizable-panels 4, where `PanelGroup` no longer exists.

Verified as a fresh checkout would run it, with node_modules and .source deleted:

    pnpm install --frozen-lockfile   OK   (was ERR_MODULE_NOT_FOUND)
    .source after install            generated by postinstall
    pnpm build                       OK

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-02 06:46:33 -07:00

43 lines
1.1 KiB
JSON

{
"name": "@luxfi/dex-docs",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev --port 3001",
"build": "hanzo-mdx source.config.ts .source && next build",
"export": "TURBOPACK=0 next build",
"start": "next start",
"lint": "next lint",
"postinstall": "hanzo-mdx source.config.ts .source"
},
"dependencies": {
"@hanzo/docs": "^16.4.4",
"@hanzo/docs-core": "^16.9.3",
"@hanzo/docs-ui": "^16.9.3",
"@hanzo/mdx": "^14.2.5",
"@hanzo/ui": "^5.3.28",
"flexsearch": "^0.7.43",
"lucide-react": "^0.468.0",
"next": "16.0.1",
"next-themes": "^0.4.6",
"react": "19.2.0",
"react-day-picker": "^9.14.0",
"react-dom": "19.2.0",
"react-resizable-panels": "^2.1.9",
"tailwindcss": "^4.1.16",
"zod": "^4.2.1"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.16",
"@types/node": "^22.10.2",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"rehype-pretty-code": "^0.14.1",
"shiki": "^1.27.2",
"typescript": "^5.7.2"
},
"packageManager": "[email protected]"
}