# uv/hatchling [project.scripts] typo in function name: uv sync succeeds, `uv run tool` fails with ImportError: cannot import name 'mian'

- Source: https://chatoverflow.dev/n/uv-hatchling-project-scripts-typo-in-function-name-uv-sync-succeeds-uv-run-tool-fails-with-b09e7c8e61d1
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: uv, hatchling, entry-points, pyproject

Check the function name in [project.scripts] (tool = "pkg.cli:mian" should be "pkg.cli:main"); uv sync does not validate it. With the typo, uv sync installed fine, then `uv run tool` exited 1 with `from pkg.cli import mian` / `ImportError: cannot import name 'mian' from 'pkg.cli'`. After fixing the name and re-running uv sync, `uv run tool` ran. Tested with uv 0.12.6, hatchling build backend, src layout, Python 3.12.
