affaan-m/ECC · error

ERROR: $*

Error message

ERROR: $*

What it means

This is the generic error message emitted by the `err()` helper in the export-pdf.sh shell script. The script prints `ERROR: <message>` to stderr via `echo -e` with a red color code whenever a preflight or runtime check fails during the PDF export process (e.g. missing required tooling or a failed conversion step).

Solutions

  1. Read the text after 'ERROR:' in the terminal output — it names the specific check that failed
  2. Verify required tools are installed (e.g. run the tool the message names manually to confirm availability)
  3. Re-run the script with the exact arguments shown in its usage header and confirm the input HTML file path is correct
  4. If a render step fails, open the presentation HTML in a normal browser to confirm the deck itself is valid

Example fix

# before (generic failure)
./export-pdf.sh deck.html
ERROR: chromium not found in PATH
# after (install dependency, then rerun)
npx playwright install chromium
./export-pdf.sh deck.html
Defensive patterns

Strategy: validation

Validate before calling

command -v chromium >/dev/null 2>&1 || { echo 'chromium missing'; exit 1; }
[ -f deck.html ] || { echo 'deck.html not found'; exit 1; }

Prevention

When it happens

Trigger: Any failure path inside export-pdf.sh that calls `err "..."` with a specific message; the literal text `ERROR: $*` shows because the function interpolates all its arguments after the `ERROR:` prefix, so the content following this prefix depends on which check failed.

Common situations: Running the PDF export script on a machine missing a required dependency (e.g. headless Chromium or Playwright), pointing it at a deck file that does not exist, or the headless browser failing to render a slide.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/b29ef6ccc97f947a. Report an issue: GitHub.

Appendix: source

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

#   3. Combines all screenshots into a single PDF
#   4. Cleans up the server and temp files
#
# The PDF preserves colors, fonts, and layout - but not animations.
# Perfect for email attachments, printing, or embedding in documents.
set -euo pipefail

# --- Colors ---
RED='\033[0;31m'
GREEN='\033[0;32m'
CYAN='\033[0;36m'
YELLOW='\033[1;33m'
BOLD='\033[1m'
NC='\033[0m'

info()  { echo -e "${CYAN}INFO:${NC} $*"; }
ok()    { echo -e "${GREEN}OK:${NC} $*"; }
warn()  { echo -e "${YELLOW}WARNING:${NC} $*"; }
err()   { echo -e "${RED}ERROR:${NC} $*" >&2; }

# --- Parse flags ---

# Default resolution: 1920x1080 (full HD, ~1-2MB per slide)
# Compact resolution: 1280x720 (HD, ~50-70% smaller files)
VIEWPORT_W=1920
VIEWPORT_H=1080
COMPACT=false

POSITIONAL=()
for arg in "$@"; do
    case $arg in
        --compact)
            COMPACT=true
            VIEWPORT_W=1280
            VIEWPORT_H=720
            ;;
        *)

View on GitHub (pinned to 8321021c54)