Skip to content
Latchkey

WXT "wxt zip" build / packaging failed in CI

wxt zip first runs wxt build, then packs the output. It fails when the build errors, or when a Firefox sources zip references files the configured includes do not cover.

What this error means

The wxt zip step fails with a build error, or with a message that files outside the project root are required for the sources zip.

wxt
ERROR  Command failed: wxt build
ERROR  The following files are imported but not included in the sources zip.
Add them to "zip.includeSources" in wxt.config.ts.

Common causes

The underlying build failed

wxt zip cannot pack output that wxt build did not produce; the real error is the build failure above.

Sources zip is missing required files

For Firefox, WXT builds a reproducible sources zip; files outside the configured includes are flagged.

How to fix it

Fix the build, then zip

  1. Run wxt build alone and resolve the reported error.
  2. Once the build succeeds, run wxt zip.
  3. Check the produced zip exists in .output.
Terminal
wxt build
wxt zip

Include the required sources

Add the flagged files to the sources zip configuration so the Firefox sources package is complete.

wxt.config.ts
// wxt.config.ts
export default defineConfig({
  zip: { includeSources: ['shared/**'] },
});

How to prevent it

  • Run wxt build before wxt zip in CI.
  • Keep zip.includeSources covering shared files.
  • Verify the output zip exists after packaging.

Related guides

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