SBT Shell Error: Not a valid key: idea-shell Follow
I can't build using SBT since the latest versions of Intellij and the scala plugin.
I keep getting the error:
[error] Not a valid command: idea-shell (similar: shell)
[error] Not a valid project ID: idea-shell
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: idea-shell (similar: daemon-shell, daemonShell)
Please sign in to leave a comment.
Thanks for this report, Alan. I've created an issue: https://youtrack.jetbrains.com/issue/SCL-12923
You're right that the mechanism is pretty brittle, but currently sbt doesn't offer any better way. We'll try to address your problem though.
For the general problem with the "not a valid key: idea-shell", see the issue https://youtrack.jetbrains.com/issue/SCL-12430
The workaround to that seems to be to delete the directory
<user home>/.sbt/<sbt version>/plugins/target/
This recurred for me as well after the 2018.2.1 update. I added proxy authentication, set sbt.override.repos to false and ran sbt to download the intellij plugins. Of course, nothing else worked, but now it was in my ivy cache. So, I deleted my proxy authentication and restored the sbt.override.repos setting. Easy peezy lemon squeezie.
I would suggest that JetBrains start testing their updates on clean machines with no and with artifactory-based internet access.
@Pascal: It didn't work for me - deleting .idea file. Please help
I downgraded my project SBT Version from 0.13.16 to 0.13.15 and it all work fines.
And if I upgrade up to 0.13.16 again it all works for fine.
I just updated my Idea to 2018.2.6 (Build #UI-182.5107.16) and I've got this problem again:
Neither of fixes proposed here help. Please take a look...
Hello, does this issue persist over restarts of IDEA?
Can you check in your <home>/.sbt/0.13/plugins/ or <home>/.sbt/1.0/plugins/ if there is a file idea.sbt and what are its contents?
It does perist between restarts hence I have stopped using intellij completely till I find a resolution to this.
There is a idea.sbt file. I even removed it and restarted intellij to see if it would fix issue by creating a new one. It created a new one but did not fix issue.
// Generated by IntelliJ-IDEA Scala plugin.
// Add settings when starting sbt from IDEA.
// Manual changes to this file will be lost.
if (java.lang.System.getProperty("idea.runid", "false") == "7.0.0+61-051fb9ba") scala.collection.Seq(
addSbtPlugin("org.jetbrains" % "sbt-structure-extractor" % "7.0.0+61-051fb9ba"),
addSbtPlugin("org.jetbrains" % "sbt-idea-shell" % "1.2+7-625c26bc")
) else scala.collection.Seq.empty
As discussed on gitter, what helped in this case was downgrading the project sbt version to 0.13.15, then upgrading back to 0.13.16.
Anybody else experiencing this issue, please report any way to reliably reproduce it if you can.
I have exactly the same issue, I'm using a .sbtopts in the project directory to relocate the SBT cache:
An idea.sbt is put into ~/.sbt directory but seems to be ignored:
And if I copy idea.plugins into the relocated SBT cache under a plugins subdirectory I get the following error:
that's coming from within SBT itself. No idea why the plugins directory would need to be an absolute path.
I keep experiencing the same problem and I keep doing this, but it's just a temporary fix. It seems like it got worse since 2017.3 . Before that, I was destroying the .idea directory in the project itself and reloading it and that used to work.
Since 2017.3 that doesn't work anymore and this workaround works for a while. Please fix this !!
What do I have to put in my sbt.repositories to get
Hi Ion, those should work out of the box with sbt, unless you are somehow blocking or excluding the sbt-plugin-releases repo.
When I test connection in the Proxy settings for https://bintray.com/sbt/sbt-plugin-releases I get 'read timed out.' Can I download that to my local ivy cache?
I am also getting this issue
It started when i upgraded the sbt version i was using
Ive tried the fixes above but nothing seems to work, any suggestions ?
Shawty, which sbt version are you on now? Have you tried deleting all the target directories as described in https://youtrack.jetbrains.com/issue/SCL-12430
I have the same issue with Idea 2018.2.1. Issue appeared after the Idea update. Worked well with 2018.1.
The fix proposed in SCL-12430 doesn't work. Tried with SBT 1.1.6 and 1.2.1.
I just encountered this issue following
a) upgrade from 2018.2.4 -> 2018.2.5
b) invalidate cache and restart
Upon restart I get
[error] Not a valid command: idea-shell (similar: shell, oldshell)
[error] Not a valid project ID: idea-shell
[error] Expected ':'
[error] Not a valid key: idea-shell (similar: daemonShell)
The fix ( delete target dir) described in https://youtrack.jetbrains.com/issue/SCL-12430 DID resolve it for me
@Sergii Sopin Deleting .idea in the project did help me.
I described it here: https://stackoverflow.com/questions/53333246/intellij-not-a-valid-project-id