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.