pbakaus/impeccable · error

Created ${zipFileName} but it contains no entries (source: $

Error message

Created ${zipFileName} but it contains no entries (source: ${providerDir}).

What it means

Thrown by createProviderZip() when the archive was finalized but archiver emitted zero 'entry' events — i.e. the provider directory existed but the glob '**/*' matched nothing (after ignoring .DS_Store). Added as a loud guard after archiver v8's ESM break once silently shipped a 0-byte universal.zip.

Source

Thrown at scripts/lib/zip.js:52

    const output = createWriteStream(zipPath);
    const archive = new ZipArchive({ zlib: { level: 9 } });

    output.on('close', resolve);
    output.on('error', reject);
    archive.on('error', reject);
    archive.on('entry', () => { entryCount += 1; });

    archive.pipe(output);
    archive.glob('**/*', {
      cwd: providerDir,
      dot: true,
      ignore: ['**/.DS_Store'],
    });
    archive.finalize();
  });

  if (entryCount === 0) {
    throw new Error(`Created ${zipFileName} but it contains no entries (source: ${providerDir}).`);
  }
  const { size } = statSync(zipPath);
  if (size === 0) {
    throw new Error(`Created ${zipFileName} but it is 0 bytes.`);
  }

  const sizeMB = (size / 1024 / 1024).toFixed(2);
  console.log(`  📦 ${zipFileName} (${sizeMB} MB)`);
}

/**
 * Create ZIP files for all providers + universal
 * @param {string} distDir - Path to dist directory
 */
export async function createAllZips(distDir) {
  console.log('\n📦 Creating ZIP bundles...');

  await createProviderZip(path.join(distDir, 'universal'), distDir, 'universal');

View on GitHub (pinned to d14711ae3d)

Solutions

  1. Inspect providerDir contents (`ls -la`) and confirm real files were staged into it.
  2. Fix the upstream provider stage so it writes its SKILL.md / scripts into the directory before zipping.
  3. If the ignore list was customized, ensure it still permits the provider's files through.

Example fix

// before — universal dir created but empty
fs.mkdirSync(path.join(distDir, 'universal'), { recursive: true });
await createProviderZip(path.join(distDir, 'universal'), distDir, 'universal');

// after — actually stage files into it
fs.cpSync(skillSrcDir, path.join(distDir, 'universal'), { recursive: true });
await createProviderZip(path.join(distDir, 'universal'), distDir, 'universal');
Defensive patterns

Strategy: validation

Validate before calling

import { readdirSync } from 'node:fs';
const real = readdirSync(providerDir, { withFileTypes: true })
  .filter(e => !e.name.endsWith('.DS_Store'));
if (real.length === 0) {
  throw new Error(`Provider dir ${providerDir} has no real files to zip.`);
}

Type guard

function providerDirHasFiles(providerDir) {
  return readdirSync(providerDir, { withFileTypes: true })
    .some(e => !e.name.endsWith('.DS_Store'));
}

Try / catch

try {
  await createProviderZip(providerDir, distDir, providerName);
} catch (err) {
  if (/no entries/.test(err.message)) {
    console.error('Provider dir empty; fix the upstream stage:', providerDir);
  } else throw err;
}

Prevention

When it happens

Trigger: providerDir exists but is empty, or contains only ignored files (e.g. only .DS_Store); the glob pattern was overridden to exclude everything; archiver.glob silently matched nothing because cwd resolved to an empty dir.

Common situations: A provider stage created the directory but failed to copy any files into it; a build step that writes provider output conditionally and skipped this provider; an over-aggressive ignore list.

Related errors


AI-assisted analysis of pbakaus/impeccable@d14711ae3d (2026-08-13). Data as JSON: /api/errors/ffff785d7f8eacf5. Report an issue: GitHub.