It happens often with current stable version of (Community) IDEA (2021.1.2) and Scala plugin (2021.1.21) that I make changes under Windows on an sbt file (sbt version 1.5.3 for example), IDEA shows that it needs to import, but it fails with:
Extracting structure failed, reason: not ok build status: Error (BuildMessages(Vector(),Vector(),Vector(),Vector(),Error))
The sbt files are correct (also the error message is not very helpful). I also have sbt shell running, though it is not executing anything.
Here is the sbt related configuration of IDEA (Build, Execution, Deployment | Build Tools | sbt):
To enable that, we need to go into our project preferences and specify that behavior. Note checkboxes next to the label, “Use sbt shell”. Enable “for imports” and “for builds” and then click “OK”. This will cause IntelliJ to run an instance of SBT to both build and to manage project dependencies.
I also have sbt shell running, though it is not executing anything.
This is the problem. When sbt shell is not used for project reload, it prevents importing the project.
The possible solutions include stopping the sbt shell during the import or change the setting "Build, Execution, Deployment" | "Build Tools" | "sbt" | "sbt projects" | "sbt shell" | "use for:" | "project reload" to be checked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With