affaan-m/ECC · error

Not found

Error message

Not found

What it means

The export-pdf static asset server fell through to its not-found response: the requested path (after URL decoding and joining with SERVE_DIR) had no readable file — typically a missing image/font referenced by the slides.

Solutions

  1. Verify the referenced path, id, or resource exists and is spelled correctly, then retry.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Triggered when export-pdf.sh rejects the current invocation: Not found

Common situations: Occurs while running skills/frontend-slides/scripts/export-pdf.sh with invalid arguments, missing flags, or a failing external dependency; the guard at skills/frontend-slides/scripts/export-pdf.sh:179 aborts the command with this message.


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/bced1b5239faa997. Report an issue: GitHub.

Appendix: source

Thrown at skills/frontend-slides/scripts/export-pdf.sh:179

  '.svg': 'image/svg+xml',
  '.webp': 'image/webp',
  '.woff': 'font/woff',
  '.woff2': 'font/woff2',
  '.ttf': 'font/ttf',
  '.eot': 'application/vnd.ms-fontobject',
};

const server = createServer((req, res) => {
  // Decode URL-encoded characters (e.g., %20 -> space) so filenames with spaces resolve correctly
  const decodedUrl = decodeURIComponent(req.url);
  let filePath = join(SERVE_DIR, decodedUrl === '/' ? HTML_FILE : decodedUrl);
  try {
    const content = readFileSync(filePath);
    const ext = extname(filePath).toLowerCase();
    res.writeHead(200, { 'Content-Type': MIME_TYPES[ext] || 'application/octet-stream' });
    res.end(content);
  } catch {
    res.writeHead(404);
    res.end('Not found');
  }
});

// Find a free port
const port = await new Promise((resolve) => {
  server.listen(0, () => resolve(server.address().port));
});

console.log(`  Local server on port ${port}`);

// --- Screenshot each slide ---

const browser = await chromium.launch();
const page = await browser.newPage({
  viewport: { width: VP_WIDTH, height: VP_HEIGHT },
});

View on GitHub (pinned to 06c5e118c4)