Scala 3 coursier new installation library not found error

Hello,
I installed Scala 3 using the link provided on scala-lang website, which installed coursier/bin folder in ~/.local/share (Linux).
My build.sbt file looks like this:

name := “test”
version := “1.6.1”
scalaVersion := “3.6.3”
scalacOptions := Seq(“-deprecation”)
libraryDependencies ++= Seq(
“org.scalatest” %% “scalatest” % “3.2.9” % “test”
)

After running “sbt clean compile” I get the following error:
module not found: org.scala-lang#scala-library;3.6.3

EDIT: Maven repo shows this message: “This artifact was moved to: org.scala-lang scala3-library”, and this URL exists:
https://repo1.maven.org/maven2/org/scala-lang/scala3-library_3/3.6.3/
But I’m not sure how to tell sbt to use that location.

Is the default installation described on scala-lang website not enough? Are there any additional steps I need to take? I would appreciate any help on this topic.
Thanks!

Note that sbt will search and download its own Scala instead of using the globally installed one (actually, you don’t even need a globally installed one at all).

Having said that, the build.sbt file looks correct, and 3.6.3 is a proper Scala version so that should work.
Can you share the contents of project/build.properties? Also, try running a clean;reload;compile in a sbt shell running in that folder.

there might be some useful clues in whatever it says before finishing with “module not found: org.scala-lang#scala-library;3.6.3” — can you provide a more complete log?

are you behind any kind of firewall, corporate or otherwise?

1 Like

Thank you for all replies, the issue was related to build.properties content, good call.
I had to update sbt version number in that file.
Thanks!

1 Like