title: Scala Akka Streams project fails to compile, "value ~> is not a member of akka.streams.Outlet[In]"
body: <p>I am using the Akka Streams API in a Scala project, working in Intellij IDEA with the SBT plugin. I have a worker pool Flow as described here: <a href="https://doc.akka.io/docs/akka/current/scala/stream/stream-cookbook.html" rel="nofollow noreferrer">https://doc.akka.io/docs/akka/current/scala/stream/stream-cookbook.html</a>. Here is my code:</p>
  
  <pre><code>package streams
  
  import akka.NotUsed
  import akka.stream.scaladsl.{Balance, Flow, GraphDSL, Merge}
  import akka.stream.{FlowShape, Graph}
  
  object WorkerPoolFlow {
    def apply[In, Out](
      worker: Flow[In, Out, Any],
      workerCount: Int):
    Graph[FlowShape[In, Out], NotUsed] = {
  
      GraphDSL.create() { implicit b =&gt;
  
        val balance = b.add(Balance[In](workerCount, waitForAllDownstreams = true))
        val merge   = b.add(Merge[Out](workerCount))
  
        for (i &lt;- 0 until workerCount)
          balance.out(i) ~&gt; worker.async ~&gt; merge.in(i)
  
        FlowShape(
          balance.in,
          merge.out)
      }
    }
  }
  </code></pre>
  
  <p>For some reason the project is now failing to compile, giving this error: <code>value ~&gt; is not a member of akka.stream.Outlet[In]</code>.</p>
  
  <p>It compiled fine until today. The only change I am aware of making is installing a Scala linter plugin <code>scalafmt</code>, and importing a few new libraries in <code>build.sbt</code>. Here is my <code>build.sbt</code>:</p>
  
  <pre><code>name := "myProject"
  
  version := "0.1"
  
  scalaVersion := "2.11.11"
  
  unmanagedJars in Compile += file("localDep1.jar")
  unmanagedJars in Compile += file("localDep2.jar")
  
  libraryDependencies += "io.spray" %%  "spray-json" % "1.3.3"
  libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.5.6"
  libraryDependencies += "com.typesafe.akka" %% "akka-stream" % "2.5.6"
  libraryDependencies += "com.typesafe.akka" %% "akka-testkit" % "2.5.6" % Test
  libraryDependencies += "com.typesafe.akka" %% "akka-stream-testkit" % "2.5.6" % Test
  libraryDependencies += "com.47deg" %% "fetch" % "0.6.0"
  libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"
  </code></pre>
  
  <p>I have tried reloading SBT, building from SBT outside of IDEA, removing and re-adding dependencies, and cleaning the project, with no luck.</p>