holothuroid
holothuroid

Reputation: 391

IntelliJ Scala SBT scala.slick package not found

I tried play around with Slick. The file is in IntelliJ project under

src/main/scala/slickfx/PlaygroundSlick.scala

In build.sbt I have:

name := "SlickFX"
version := "1.0"
scalaVersion := "2.12.1"
libraryDependencies ++= Seq(
   "org.postgresql" % "postgresql" % "9.3-1100-jdbc4",
   "com.typesafe.slick" %% "slick" %  "3.2.0",
   "org.slf4j" % "slf4j-nop" % "1.6.4"
 )

My source code is:

package slickfx
import scala.slick.driver.PostgresDriver.simple._

object PlaygroundSlick extends App {
}

Now, the import scala.slick is red and won't compile.

Upvotes: 0

Views: 497

Answers (2)

holothuroid
holothuroid

Reputation: 391

It works, when the call is import slick, not import scala.slick. Apparently the package structure was changed, but the documentation was not.

Upvotes: 0

jamborta
jamborta

Reputation: 5220

Try to refresh the project in sbt:

View -> Tool Windows -> SBT

Then click on the refresh button.

Upvotes: 1

Related Questions