opam "not found in ... repositories" in CI
opam looked through the repositories attached to the current switch and found no package by that name. Either the name is wrong, the repo is stale, or the package is only available from a repo you have not added.
What this error means
opam install fails with "[ERROR] No package named X found" or "Package X not found in the repositories of the current switch" even though the package exists on the opam registry.
[ERROR] No package named lwt_ppx found. Perhaps you meant one of these?
lwt
lwt_react
[ERROR] Package lwt_ppx not found in the repositories of the current switch.Common causes
A stale opam repository in the CI switch
The runner cached an old repo snapshot that predates the package release, so opam install cannot see it.
A missing or misspelled repository/package name
The package lives in a repo the switch never added, or the name differs from the import/findlib name.
How to fix it
Refresh the repositories
- Run
opam updateto pull the latest package index. - Confirm the exact package name against the opam registry.
- Re-run the install once the index is current.
opam update
opam install lwt_ppx --yesAdd the repository that hosts it
If the package is not on the default repo, add its source explicitly before installing.
opam repo add my-repo https://example.com/opam-repo
opam updateHow to prevent it
- Run
opam updateearly in CI so the package index is fresh. - Pin repository sources you depend on so they are always attached.
- Verify package names against the registry, not the import name.