# HF Space "Static SDK is not supported"

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhf-space-static-sdk-is-not-supported%2F173178%3E%5C
**Category:** Spaces\
**Created:** [February 7, 2026, 10:39am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhf-space-static-sdk-is-not-supported%2F173178 "2026-02-07T10:39:14Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [February 7, 2026, 12:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhf-space-static-sdk-is-not-supported%2F173178%2F2 "2026-02-07T12:16:31Z")

</div>

That probably won’t be a problem…

Sometimes the cache causes issues; in those cases, you can clear it by making a meaningless change to the `sdk:` line and then reverting it…

* * *

## Is it a problem that you don’t have `app_build_command`?

No.

Static Spaces can work in **either** of these modes:

1. **You commit the built files** (e.g., `dist/`) and set `app_file` to the HTML entrypoint.
2. **Hugging Face builds for you** by running `app_build_command` on every update and then serving the output from a special build ref (`refs/convert/build`). ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-sdks-static "Static HTML Spaces"))

So missing `app_build_command` is only a problem if `dist/index.html` is not present (or not where `app_file` points) in the repo revision the Space is serving.

* * *

## Why it “worked at first” and then later changed to “Static SDK is not supported”

That message is a _configuration-level_ failure. In practice it usually comes from one of these:

### 1) Your README config is not being parsed as Spaces configuration (very common)

Spaces only read settings from the **YAML front-matter block at the very top of `README.md`**. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-config-reference "Spaces Configuration Reference"))

If you literally added:

```md
sdk: static
app_file: dist/index.html

```

…but **not** inside a top-of-file YAML front-matter block, Hugging Face may ignore it and fall back into a “configuration error” state.

**What “correct” looks like:**

```md
---
sdk: static
app_file: dist/index.html
---

```

**Pitfalls that break parsing**

- The YAML block is **not the first thing** in the README (badges/text above it).
- It’s inside a Markdown code fence (```).
- It contains placeholders or invalid YAML.
- It was edited later and became malformed.

There are public examples where a misconfigured/template README ends up showing the same “Static SDK is not supported” configuration error page. ([Hugging Face](https://huggingface.co/spaces/huggingface/okta-saml-integration-guide "Okta SAML integration guide - a Hugging Face Space by ..."))

**Why the delay?**

- The Space can appear fine until a rebuild/restart causes Hugging Face to re-evaluate config strictly, or until a platform-side validation change takes effect.

* * *

### 2) Your Space is still set to **ZeroGPU** from the old Gradio setup

ZeroGPU has a hard constraint: **ZeroGPU Spaces are exclusively compatible with the Gradio SDK** , not static. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-zerogpu "Spaces ZeroGPU: Dynamic GPU Allocation for Spaces"))

**Why the delay?**

- It might run briefly (or show cached content), then once the runtime config is enforced/rebuilt it flips into an error state.

**Fix**

- Space **Settings → Hardware** : switch away from ZeroGPU to a CPU tier (or standard GPU where applicable), then rebuild.

* * *

### 3) Dev Mode is enabled

**Dev Mode is not available for static Spaces.** ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-dev-mode "Spaces Dev Mode: Seamless development in Spaces"))

**Fix**

- Space **Settings → Dev Mode** : disable, then rebuild.

* * *

### 4) `app_file` path format/validation changed (edge case)

A recent “it randomly stopped working” case was caused by `app_file` syntax being slightly off and fixed by changing `./index.html` → `index.html`. ([Hugging Face Forums](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmy-space-randomly-stopped-working-no-application-file%2F170511 "My space randomly stopped working. "No application file""))

Your `dist/index.html` form is the recommended pattern in the docs, but it’s worth verifying you didn’t accidentally use a leading `./` or `/` in the actual README. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-sdks-static "Static HTML Spaces"))

* * *

### 5) `dist/` is missing (or stale) in the revision being served

If you don’t use `app_build_command`, Hugging Face serves whatever is committed. If `dist/index.html` isn’t present (or you pushed a commit without rebuilding locally), you can land in a broken state.

**Fix**

- In the Space “Files” view, confirm `dist/index.html` exists on the current commit and matches `app_file`.

* * *

## What I would do for _your_ case (fastest path)

### Step 1 — Make the README config unquestionably valid

Put this **as the first lines** of `README.md` (no text above it):

```md
---
sdk: static
app_file: dist/index.html
---

```

This is required because Spaces configuration is read from the README YAML block. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-config-reference "Spaces Configuration Reference"))

### Step 2 — Check Settings for static-incompatible modes

- If Hardware is **ZeroGPU** → change to CPU. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-zerogpu "Spaces ZeroGPU: Dynamic GPU Allocation for Spaces"))
- If **Dev Mode** is enabled → disable it. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-dev-mode "Spaces Dev Mode: Seamless development in Spaces"))

### Step 3 — Verify the entrypoint exists

Confirm the repository (current commit) contains: `dist/index.html` and that it loads without needing server-side routing.

* * *

## “Should we add `app_build_command` anyway?”

It’s optional, but often improves reliability for teams because it prevents “forgot to commit dist” and makes deploys reproducible.

Static docs describe this build mode: Hugging Face runs your build command on each update and serves the output from `refs/convert/build`. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-sdks-static "Static HTML Spaces"))

A typical config:

```md
---
sdk: static
app_build_command: npm ci && npm run build
app_file: dist/index.html
---

```

(You can use bun, but the most predictable path is using the toolchain Hugging Face documents directly—`npm run build`—unless you’ve verified bun availability in the build environment.) ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-sdks-static "Static HTML Spaces"))

* * *

## Quick checklist mapping to your symptoms

- You pasted config **without** `---` front-matter → very likely cause. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-config-reference "Spaces Configuration Reference"))
- Space previously used **ZeroGPU** with Gradio → likely cause. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-zerogpu "Spaces ZeroGPU: Dynamic GPU Allocation for Spaces"))
- Dev Mode enabled during debugging → likely cause. ([Hugging Face](https://huggingface.co/docs/hub/en/spaces-dev-mode "Spaces Dev Mode: Seamless development in Spaces"))
- `app_file` format subtly changed (`./…`) → possible. ([Hugging Face Forums](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmy-space-randomly-stopped-working-no-application-file%2F170511 "My space randomly stopped working. "No application file""))

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhf-space-static-sdk-is-not-supported%2F173178)._
