zarazhangrui/frontend-slides · error

${RED}✗${NC} $*

Error message

${RED}✗${NC} $*

What it means

This message is the output of the err() helper in deploy.sh (line 32), a bash script that deploys a slide deck to Vercel. It is not a runtime exception: err() prints a red ✗ plus its arguments to stderr and the script exits 1 whenever validation or a deployment step fails. Which message you get depends on where validation failed — missing usage argument, missing index.html, not-logged-in, or 'Deployment failed:'.

Source

Thrown at plugins/frontend-slides/skills/frontend-slides/scripts/deploy.sh:32

#   3. Deploys the slide deck to a public URL
#   4. Prints the live URL
#
# The deployed URL is permanent and works on any device (mobile, tablet, desktop).
# No server to maintain — Vercel hosts it for free.
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}ℹ${NC} $*"; }
ok()    { echo -e "${GREEN}✓${NC} $*"; }
warn()  { echo -e "${YELLOW}⚠${NC} $*"; }
err()   { echo -e "${RED}✗${NC} $*" >&2; }

# ─── Input validation ─────────────────────────────────────

if [[ $# -lt 1 ]]; then
    err "Usage: bash scripts/deploy.sh <path-to-slide-folder-or-html>"
    err ""
    err "Examples:"
    err "  bash scripts/deploy.sh ./my-pitch-deck/"
    err "  bash scripts/deploy.sh ./presentation.html"
    exit 1
fi

INPUT="$1"

# If input is a single HTML file, create a temp directory with it as index.html
if [[ -f "$INPUT" && "$INPUT" == *.html ]]; then
    DEPLOY_DIR=$(mktemp -d)
    cp "$INPUT" "$DEPLOY_DIR/index.html"

View on GitHub (pinned to 9906a34d64)

Solutions

  1. Re-run with a valid argument: bash scripts/deploy.sh ./my-deck/ (a folder containing index.html) or bash scripts/deploy.sh ./deck.html
  2. If deploying a folder, ensure it contains an index.html at its root (rename presentation.html to index.html or pass the single HTML file directly)
  3. Run 'vercel login' manually and verify with 'vercel whoami', then re-run the deploy script
  4. Read the 'Deployment failed:' output block the script prints for the underlying vercel error and fix that cause (auth, network, project name)
  5. Confirm Node.js/npx are installed; the script exits early with an err message if npx is missing

Example fix

// before
$ bash scripts/deploy.sh            # no argument
✗ Usage: bash scripts/deploy.sh <path-to-slide-folder-or-html>

// after
$ bash scripts/deploy.sh ./my-pitch-deck/   # folder containing index.html
✓ Slides deployed successfully!
  Live URL: https://my-pitch-deck.vercel.app
Defensive patterns

Strategy: validation

Validate before calling

#!/usr/bin/env bash
# Pre-flight checks before running deploy.sh
set -euo pipefail
DECK="$1"
[[ $# -ge 1 ]] || { echo "Usage: deploy.sh <folder-or-html>" >&2; exit 1; }
if [[ -d "$DECK" ]]; then
  [[ -f "$DECK/index.html" ]] || { echo "'$DECK' has no index.html" >&2; exit 1; }
elif [[ -f "$DECK" && "$DECK" == *.html ]]; then
  : # single-file deck is fine
else
  echo "'$DECK' is not a valid HTML file or directory" >&2; exit 1
fi
command -v npx >/dev/null || { echo "Node.js required" >&2; exit 1; }
vercel whoami >/dev/null 2>&1 || { echo "Run 'vercel login' first" >&2; exit 1; }

Type guard

is_valid_deck_input() {
  local p="$1"
  [[ -f "$p" && "$p" == *.html ]] || [[ -d "$p" && -f "$p/index.html" ]]
}

Try / catch

# deploy.sh already exits non-zero on failure; wrap the call and inspect stderr
if ! bash scripts/deploy.sh "$DECK" 2>deploy.err; then
  cat deploy.err >&2
  # distinguish failure modes:
  grep -q 'not logged in\|Login failed' deploy.err && vercel login
  grep -q 'index.html' deploy.err && echo "Add an index.html to the deck folder"
  exit 1
fi

Prevention

When it happens

Trigger: Calling deploy.sh with no arguments (usage error); passing a path that is neither an existing .html file nor a directory; passing a folder without an index.html inside; 'vercel login' failing or being aborted during the interactive login; the underlying 'vercel deploy <dir> --yes --prod' command exiting non-zero (auth token expired, network error, invalid project name).

Common situations: Running the script from the wrong working directory so the relative path to the deck is wrong; passing a folder that contains presentation.html instead of the required index.html; Vercel CLI not authenticated (never ran vercel login) or token expired in CI; deploying a directory whose name sanitizes to an empty/invalid Vercel project name.

Related errors


AI-assisted analysis of zarazhangrui/frontend-slides@9906a34d64 (2026-08-29). Data as JSON: /api/errors/0c8561143512bba7. Report an issue: GitHub.