unslothai/unsloth · critical · SystemExit

[ERROR] Unsloth frontend build not found. Tried: {tried_line

Error message

[ERROR] Unsloth frontend build not found.
Tried:
{tried_lines}

Likely cause: another 'unsloth' on PATH is shadowing the installer's binary and points at a site-packages tree with no built dist.

Fix one of:
  - run the installer's binary directly: {installer_bin} studio
  - pass --frontend <path/to/studio/frontend/dist>
  - pass --api-only to skip serving the web UI
  - reinstall: curl -fsSL https://unsloth.ai/install.sh | sh

What it means

Fatal startup error (SystemExit): the web-UI server could not find a built frontend dist in any of the probed locations. The message lists every path tried, computes the installer's expected binary path from UNSLOTH_STUDIO_HOME/STUDIO_HOME (~/.unsloth/studio), and names the dominant cause: a different 'unsloth' executable earlier on PATH (e.g. a pip-installed one) whose package tree has no built dist. It then offers four remedies.

Source

Thrown at studio/backend/run.py:2425

            logger.warning(
                "No frontend build found, so Remote access will not serve the web UI. Tried: %s",
                ", ".join(str(p) for p in attempted) or "(none)",
            )
        else:
            home_str = (
                os.environ.get("UNSLOTH_STUDIO_HOME")
                or os.environ.get("STUDIO_HOME")
                or str(Path.home() / ".unsloth" / "studio")
            )
            # Windows shim: $STUDIO_HOME/bin/unsloth.exe; Linux/macOS venv binary:
            # $STUDIO_HOME/unsloth_studio/bin/unsloth.
            home = Path(home_str).expanduser()
            if sys.platform == "win32":
                installer_bin = home / "bin" / "unsloth.exe"
            else:
                installer_bin = home / "unsloth_studio" / "bin" / "unsloth"
            tried_lines = "\n".join(f"  - {p}" for p in attempted) or "  (none)"
            raise SystemExit(
                "[ERROR] Unsloth frontend build not found.\n"
                f"Tried:\n{tried_lines}\n"
                "\n"
                "Likely cause: another 'unsloth' on PATH is shadowing the "
                "installer's binary and points at a site-packages tree with "
                "no built dist.\n"
                "\n"
                "Fix one of:\n"
                f"  - run the installer's binary directly: {installer_bin} studio\n"
                + (
                    # An Application Control policy can block the generated
                    # unsloth.exe while the signed interpreter beside it still
                    # runs, so name a route that does not go through it.
                    f"  - or through the interpreter: {sys.executable} -I -m unsloth_cli studio\n"
                    if sys.platform == "win32"
                    else ""
                )
                + "  - pass --frontend <path/to/studio/frontend/dist>\n"

View on GitHub (pinned to 203007d190)

Solutions

  1. Run the installer's binary directly: ~/.unsloth/studio/unsloth_studio/bin/unsloth studio (or bin/unsloth.exe on Windows).
  2. Or pass --frontend <path/to/studio/frontend/dist> pointing at a built dist.
  3. Or pass --api-only to run without the web UI.
  4. Otherwise reinstall cleanly: curl -fsSL https://unsloth.ai/install.sh | sh (after removing/un-pip-ing the shadowing package).
  5. Verify which unsloth wins: which -a unsloth.

Example fix

# before
$ which unsloth
/home/me/.local/bin/unsloth   # pip version, no dist
$ unsloth studio
# [ERROR] Unsloth frontend build not found.

# after
$ pip uninstall unsloth
$ ~/.unsloth/studio/unsloth_studio/bin/unsloth studio
Defensive patterns

Strategy: validation

Validate before calling

# Pre-flight: does the winning binary have a dist?
BIN="$(command -v unsloth)"; echo "using $BIN"
DISTS=("$(dirname "$BIN")/../lib"/python*/site-packages/studio/frontend/dist 2>/dev/null)
for d in "${DISTS[@]}"; do [ -d "$d" ] && echo "dist ok: $d" || echo "MISSING: $d"; done

Prevention

When it happens

Trigger: pip install unsloth shadowing the official installer's binary; UNSLOTH_STUDIO_HOME pointing at a moved/incomplete directory; a partially failed install where the frontend build step never ran; running the module directly from a source checkout without building the frontend.

Common situations: Machines with both a pip unsloth and the curl-installed one; PATH reordered by a version manager (conda/pyenv); the dist folder deleted to shrink a container.

Related errors


AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15). Data as JSON: /api/errors/206b902446149d91. Report an issue: GitHub.