# RuntimeError: Static files directory does not exist: /app/static

- **ID:** `python/starlette-static-files-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Starlette 配置的静态文件目录路径不存在。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   确保目录存在，或在代码中自动创建。
   ```
2. **** (95% success)
   ```
   使用绝对路径，基于 __file__ 计算。
   ```
3. **** (85% success)
   ```
   检查部署环境中的目录权限。
   ```

## Dead Ends

- **** — 忽略错误，不创建目录，导致请求 404。 (80% fail)
- **** — 使用相对路径但工作目录不同。 (70% fail)
- **** — 尝试在运行时创建目录但权限不足。 (60% fail)
