Skip to content
Latchkey

CRXjs "ManifestV3 schema" / invalid manifest input in CI

The CRXjs Vite plugin parses the manifest you pass it and validates it against the Manifest V3 schema. An invalid field or an entry pointing at a missing file fails the Vite build.

What this error means

vite build fails with a CRXjs error that the manifest is invalid or that an input file referenced by the manifest could not be resolved.

crxjs
[crxjs] Manifest validation failed:
  - background.service_worker: file "src/background.ts" does not exist
[vite]: Rollup failed to resolve input.

Common causes

A manifest entry points at a missing file

CRXjs treats manifest entries as Rollup inputs; a content script or service worker path that does not exist breaks the build.

A manifest field violates the MV3 schema

A wrong type or unknown key in the manifest object passed to the plugin fails schema validation.

How to fix it

Point manifest entries at real source files

  1. Confirm every script path in the manifest exists in the source tree.
  2. Correct the path or create the missing file.
  3. Re-run the Vite build.
vite.config.ts
// vite.config.ts
import { crx } from '@crxjs/vite-plugin';
import manifest from './manifest.json';
export default defineConfig({ plugins: [crx({ manifest })] });

Conform the manifest to the MV3 schema

Fix the field the plugin names so the manifest object validates.

How to prevent it

  • Keep manifest entry paths in sync with source files.
  • Validate the manifest object against MV3 before building.
  • Run the Vite extension build in CI on every change.

Frequently asked questions

What causes "CRXjs manifest schema error"?
CRXjs treats manifest entries as Rollup inputs; a content script or service worker path that does not exist breaks the build.
How do I fix CRXjs manifest schema error?
Point manifest entries at real source files

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card