Skip to content

DOCXKIT_MANIFEST_INVALID: Invalid plugin manifest ​

The manifest has an invalid field, version range, or entry path.

What to do ​

  1. Correct the field named in the message.
  2. Use non-empty strings, valid semver, and safe relative paths beginning with ./.
  3. Keep the entry inside the plugin package.

Problem example ​

ts
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, main: '../outside.js' })

Corrected example ​

ts
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)

Common causes ​

  • Missing required fields, malformed version ranges, or paths escaping the package.

Diagnostic fields ​

Example message ​

text
Plugin manifest field "main" must be a safe relative path beginning with "./"

Released under the MIT License.