{"record":{"id":"b29ef6ccc97f947a","repo":"affaan-m/ECC","slug":"error","errorCode":null,"errorMessage":"ERROR: $*","messagePattern":"ERROR: \\$\\*","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"skills/frontend-slides/scripts/export-pdf.sh","lineNumber":32,"sourceCode":"#   3. Combines all screenshots into a single PDF\n#   4. Cleans up the server and temp files\n#\n# The PDF preserves colors, fonts, and layout - but not animations.\n# Perfect for email attachments, printing, or embedding in documents.\nset -euo pipefail\n\n# --- Colors ---\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nCYAN='\\033[0;36m'\nYELLOW='\\033[1;33m'\nBOLD='\\033[1m'\nNC='\\033[0m'\n\ninfo()  { echo -e \"${CYAN}INFO:${NC} $*\"; }\nok()    { echo -e \"${GREEN}OK:${NC} $*\"; }\nwarn()  { echo -e \"${YELLOW}WARNING:${NC} $*\"; }\nerr()   { echo -e \"${RED}ERROR:${NC} $*\" >&2; }\n\n# --- Parse flags ---\n\n# Default resolution: 1920x1080 (full HD, ~1-2MB per slide)\n# Compact resolution: 1280x720 (HD, ~50-70% smaller files)\nVIEWPORT_W=1920\nVIEWPORT_H=1080\nCOMPACT=false\n\nPOSITIONAL=()\nfor arg in \"$@\"; do\n    case $arg in\n        --compact)\n            COMPACT=true\n            VIEWPORT_W=1280\n            VIEWPORT_H=720\n            ;;\n        *)","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/frontend-slides/scripts/export-pdf.sh#L14-L50","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the text after 'ERROR:' in the terminal output — it names the specific check that failed","Verify required tools are installed (e.g. run the tool the message names manually to confirm availability)","Re-run the script with the exact arguments shown in its usage header and confirm the input HTML file path is correct","If a render step fails, open the presentation HTML in a normal browser to confirm the deck itself is valid"],"exampleFix":"# before (generic failure)\n./export-pdf.sh deck.html\nERROR: chromium not found in PATH\n# after (install dependency, then rerun)\nnpx playwright install chromium\n./export-pdf.sh deck.html","handlingStrategy":"validation","validationCode":"command -v chromium >/dev/null 2>&1 || { echo 'chromium missing'; exit 1; }\n[ -f deck.html ] || { echo 'deck.html not found'; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the script's dependency checks or install Playwright/Chromium before first use","Always pass an existing HTML deck path as the argument","Check the exit code of the script in CI and fail fast"],"tags":["shell","scripting","pdf-export","missing-dependency"],"backgroundTag":"missing-dependency","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}