Skip to content
Latchkey

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.

spago
[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

  1. Verify the exact package name as published in the set.
  2. Fix the name, or upgrade the package set to one that includes it.
  3. Re-run spago build.
Terminal
spago upgrade-set
spago build

Add 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 build locally before pushing.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →