# error in setup.cfg: InvalidConfigError: metadata.name is required

- **ID:** `python/setuptools-metadata-name-missing`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The build configuration (setup.cfg/pyproject.toml) lacks a package name. setuptools cannot produce valid metadata without a name field.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8+ | active | — | — |

## Workarounds

1. **** (96% success)
   ```
   # setup.cfg
[metadata]
name = mypackage
version = 1.0.0
# or pyproject.toml
[project]
name = "mypackage"
version = "1.0.0"
   ```
2. **** (85% success)
   ```
   # pyproject.toml
[project]
name = "mypackage"
dynamic = ["version"]
# provide version in setup.py: setup(version=compute_version())
   ```

## Dead Ends

- **** — If pyproject.toml declares build-backend setuptools.build_meta and config files disagree, duplicate/overriding metadata can still error or be ignored. (70% fail)
- **** — Empty string is invalid metadata; setuptools raises a different validation error. (85% fail)
