Skip to content
Latchkey

web-ext lint errors block the build in CI

web-ext lint runs the same addons-linter AMO uses. When it reports one or more errors (not just warnings) it exits non-zero, which fails the CI step before you ever upload.

What this error means

web-ext lint prints a table of messages with a non-zero count under "errors", then exits with a failure code that stops the workflow.

web-ext
Validation Summary:
errors          1
notices         0
warnings        2
JSON_INVALID    "/permissions/0"  is not a valid permission

Common causes

An invalid manifest field or permission

The linter flags an unknown permission, a malformed key, or a missing required field as a hard error.

Disallowed or deprecated APIs in code

addons-linter raises errors for patterns AMO will not accept, such as remote code evaluation.

How to fix it

Resolve each reported error

  1. Read the message code and the JSON pointer or file:line it cites.
  2. Fix the manifest field or code it names.
  3. Re-run web-ext lint until only warnings remain.
Terminal
web-ext lint --source-dir dist --warnings-as-errors=false

Lint the built output, not the source

Point web-ext at the bundled directory so the manifest and assets it checks are the ones you will ship.

.github/workflows/ci.yml
- run: npm run build
- run: npx web-ext lint --source-dir dist

How to prevent it

  • Run web-ext lint on the built output in every CI run.
  • Keep the manifest to documented keys and permissions only.
  • Treat lint errors as blocking before signing or uploading.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →