cabal "encountered missing dependencies" in CI
The cabal solver could not find a set of package versions satisfying every bound. Some dependency or version constraint cannot be met.
What this error means
cabal build aborts with Encountered missing or private dependencies, listing the packages and bounds it could not satisfy. It is deterministic given the index and constraints.
stack
Resolving dependencies...
Error: cabal: Encountered missing or private dependencies:
aeson >=2.2 && <2.3
text ==1.2.*Common causes
Conflicting or too-tight bounds
Two dependencies require incompatible versions of a shared package, or a bound excludes every available release.
Stale package index
A package or version exists upstream but the local Hackage index is out of date, so the solver cannot see it.
How to fix it
Update the package index
Refresh Hackage so the solver sees current releases.
CI step
cabal update
cabal build allRelax or align the bounds
- Loosen overly tight upper bounds that exclude valid versions.
- Use a
cabal.project.freezeto lock a known-good set. - Pick an index-state for reproducible resolution.
Pin a working plan
Commit a freeze file so CI resolves the same versions every run.
CI step
cabal freezeHow to prevent it
- Commit a cabal.project.freeze for reproducibility.
- Run cabal update before building in CI.
- Keep version bounds reasonable.
Related guides
GHC "Could not find module" in CIFix Haskell GHC "Could not find module" in stack/cabal CI - a module is not in the package, not a dependency,…
stack "Error parsing targets" in CIFix Haskell stack "Error parsing targets" in CI when a build target, package, or component name on the comman…
Mix "deps.get" could not fetch a dependencyFix Elixir "mix deps.get" failures when a git or Hex dependency cannot be fetched in CI - bad refs, auth, or…