spago "Cannot find package" in CI
spago tried to resolve a declared dependency and the active package set does not contain it. The name is wrong, or the package set version predates (or omits) that package.
What this error means
spago install / spago build fails with "Cannot find package X in the package set" or "The following packages do not exist in the package set", naming the missing dependency.
[error] The following packages do not exist in your package set:
- some-extra-lib
Please make sure that they are present in the package set, or add them as extra dependencies.Common causes
A misspelled package name
The dependency name in your spago config does not match any package in the set, so spago cannot resolve it.
The package is not in this set version
The pinned package set is older or newer than the one that includes the package, so the name is absent.
How to fix it
Correct the name or upgrade the set
- Verify the exact package name as published in the set.
- Fix the name, or upgrade the package set to one that includes it.
- Re-run
spago build.
spago upgrade-set
spago buildAdd it as an extra dependency
If the package is genuinely outside the set, declare it as an extra package pinned to a specific source and version, then build.
How to prevent it
- Use exact package names as listed in the package set.
- Pin a package set version that contains every dependency you need.
- Run
spago buildlocally before pushing.