sbt "value X is not a member of Y" in CI
You called a method or accessed a field on a value whose type does not have it. The compiler looked at the receiver type and found no such member.
What this error means
Compilation fails with value foo is not a member of Bar, often suggesting a similarly named member. It is deterministic and points at the call site.
[error] /src/main/scala/App.scala:8:18: value toJson is not a member of
[error] scala.collection.immutable.Map[String,Int]
[error] val out = data.toJson
[error] ^Common causes
Missing extension method or import
The member comes from an extension method or syntax import (a circe/cats syntax package) that is not in scope, so the base type has no such method.
Wrong receiver type
Inference gave the value a wider or different type than you assumed, so the member you expected is not declared on it.
Typo or wrong API version
The method name is misspelled, or a library upgrade renamed or removed the member.
How to fix it
Import the syntax that adds the method
Bring the extension/syntax package into scope so the member resolves.
import io.circe.syntax._
val out = data.asJsonCheck the receiver type
- Hover or annotate the value to confirm its actual type.
- Verify the member exists on that type in the library docs.
- Adjust the call to a method that the type really declares.
Align with the library version
Confirm the method name matches the version on your classpath; consult the changelog after a dependency bump.
How to prevent it
- Keep syntax imports consistent across files.
- Read changelogs before bumping libraries.
- Let the IDE flag unknown members before pushing.