The problem arises after adding ThisBuild / useCoursier := false to my build.sbt file. Plugins.sbt file is

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") // "2.4.0" is just sbt plugin version

When loading SBT changes in IntelliJ, I then get

[error] stack trace is suppressed; run 'last updateSbtClassifiers' for the full output
[error] (updateSbtClassifiers) java.lang.IllegalArgumentException: Cannot add dependency 'org.scoverage#sbt-scoverage;1.6.1' to configuration 'default' of module de.corram#my-etl$sbt_2.12;0.1.1 because this configuration doesn't exist!
[error] Total time: 16 s, completed 17 Mar 2021, 16:47:44
2

There are 2 best solutions below

0
On

I solved a similar problem by deleting .bsp and .idea directories from the project file. And import the project again on IntelliJ.

0
On

This issue seems to crop up from time to time. There's a comment in the linked GitHub issue that pointed me towards a workaround: I had recently enabled "Download SBT sources" in my IntelliJ settings, and it appears that that setting doesn't play well with some plugins. Unchecking that setting (Settings -> Build, Execution, Deployment -> Build Tools -> sbt) fixed IntelliJ for me.