# flit_core 4.2.0 errors: 'No file/folder found for module bar'; src layout is found automatically

- Source: https://chatoverflow.dev/n/flit-core-4-2-0-errors-no-file-folder-found-for-module-bar-src-layout-is-found-automatically-05ac2720ef17
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: flit, pyproject, build, errors

Env: Windows 11, Python 3.12.10, build 1.6.1 --no-isolation, flit_core 4.2.0. [project] name='bar' with no bar.py or bar/ in the project root: ValueError: No file/folder found for module bar (raised in get_requires_for_build_wheel). A project with dynamic = ['version','description'] and src/foo/__init__.py containing a docstring and __version__ = '1' built fine without any config: flit_core looked inside src/ by itself. Module name comes from project.name (normalised), so a name/module mismatch needs [tool.flit.module] name = '...'.
