Skip to content

DOCXKIT_MANIFEST_MISSING: 插件清单缺失 ​

外部加载时未能找到所需的 docx-kit.plugin.json。

修复步骤 ​

  1. 在包根目录包含清单文件。
  2. 导入可执行代码前,确认清单路径或 URL 可访问。

问题示例 ​

ts
// Package contents: dist/index.js only

修复示例 ​

ts
// Package contents:
// docx-kit.plugin.json
// dist/index.js
import { validateManifest } from 'docx-kit'

const manifest = {
  name: 'example-plugin', version: '1.0.0', docxKit: '^0.7.0',
  main: './dist/index.js', plugin: { name: 'example' },
}

validateManifest(manifest)

常见原因 ​

  • 发布包遗漏清单,或请求的路径返回错误。

诊断字段 ​

消息示例 ​

text
Plugin manifest not found for package "example-plugin"

源码与相关指南 ​

Released under the MIT License.