DOCXKIT_UNKNOWN_NODE_TYPE: Unknown node type
No compiler supports this node in its current context.
What to do
- Use a documented DSL type.
- Represent custom content with a registered plugin node.
- Keep sectionBreak nodes at document level, outside nested content.
Problem example
ts
// Invalid DSL fragment:
const node = { type: 'paragaph', text: 'Hello' }Corrected example
ts
import { renderDocx } from 'docx-kit'
const doc = await renderDocx({
content: [{ type: 'paragraph', text: 'Hello' }],
})
const blob = await doc.toBlob()Common causes
- Misspelled node types, block nodes used inline, or nested section breaks.
Diagnostic fields
code:UNKNOWN_NODE_TYPEdiagnosticCode:DOCXKIT_UNKNOWN_NODE_TYPEname:DocxKitErrordocs: https://docx-kit.ntnyq.dev/errors/docxkit_unknown_node_type/
Example message
text
Unknown node type: unknown