Skip to content

DOCXKIT_PLUGIN_DEPENDENCY_MISSING: 插件依赖缺失 ​

这是公开的插件依赖错误码,当前内置加载器不会自动抛出此码。

修复步骤 ​

  1. 自定义集成报告此码时,检查该集成的依赖校验。
  2. 安装插件要求的依赖及兼容版本。

问题示例 ​

ts
import { createDocxKitError } from 'docx-kit'

// Explicit reporting by a custom dependency validator.
throw createDocxKitError('PLUGIN_DEPENDENCY_MISSING', {
  dependency: 'example-dependency',
})

修复示例 ​

ts
// Install a compatible dependency declared by the plugin manifest.
// Built-in loaders do not currently raise this code automatically.
const manifestDependencies = { 'example-dependency': '^1.0.0' }

常见原因 ​

  • 集成显式报告依赖缺失或版本不兼容。

诊断字段 ​

消息示例 ​

text
Plugin dependency missing: example-dependency

源码与相关指南 ​

Released under the MIT License.