<#21713 pants package failing due to no roots even...
# github-notifications
c
#21713 pants package failing due to no roots even where they exist New discussion created by kdowney-talos When I run
pants package ::
at the top level of our monorepo, I get
Copy code
NoSourceRootError: No source root found for `serenity.analytics`. See <https://www.pantsbuild.org/2.23/docs/using-pants/key-concepts/source-roots> for how to define source roots.
But if I run `pants roots`:
Copy code
serenity.analytics/src/python
serenity.analytics/tests
as expected based on this setting:
Copy code
[source]
root_patterns = [
  "src/protos",
  "src/python",
  "tests",
  "/serenity.risk"
]
Here is `serenity.analytics/BUILD`:
Copy code
python_requirements(name="deps", source="pyproject.toml")

resource(name="pyproject", source="pyproject.toml")
resource(name="version", source="VERSION.txt")

python_distribution(
    name="dist",
    dependencies=["//serenity.analytics/src/python:lib", ":pyproject", ":version"],
    provides=python_artifact(name="serenity-analytics"),
    generate_setup=False,
)
and the corresponding
src/python/BUILD
is just this one line:
Copy code
python_sources(name="lib", sources=["**/*.py"]])
What am I missing? This is with Pants 2.23, Python 3.12. pantsbuild/pants