Reputation: 5306
I am doing course about scala from coursera, but i can not run my first worksheet. I created sbt scala project in Intellij 15.0.1 with SBT 0.13.8 ,java version1.7.0_85 and scala 2.11.7. Whenever i try to run my worksheet it gives me an errors:
Error:object MacroPrinter211 is not a member of package org.jetbrains.plugins.scala.worksheet import root.org.jetbrains.plugins.scala.worksheet.MacroPrinter211 ^
and the second one:
Error:(6, 67) not found: value MacroPrinter211 println("res0: " + {val $$temp$$ = inst$A$A.get$$instance$$res0; MacroPrinter211.printDefInfo($$temp$$).replace("inst$A$A.", "") + " = " + ( print$$$Worksheet$$$Array$$$($$temp$$) ).stripPrefix("A$A12$A$A12$")}) ^
My code:
println("Hello World")
file structure: test_project > src > main > scala-2.11 > hello.sc
Whenever i try to run this from terminal with sbt i get:
[info] Set current project to scala-2-11 (in build file:/home/Kuba/Codes/Scala/test_project/src/main/scala-2.11/)
[error]Expected ID character
[error] Not a valid command: hello (similar: shell, help, reload)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration) [error] Expected key
[error] Not a valid key: hello
[error] hello.sc [error]
However if i run this with just scala command it works perfectly.
Any idea how to fix that?
How do I get IntelliJ worksheet to run Scala in an sbt-based project?
Upvotes: 1
Views: 1528
Reputation: 5306
Reinstalling scala plugin and updating sbt and scala it self fixed the issue.
Upvotes: 0