scala: error: not found: object play

I am using default for project based on playframework. But CI is failing with error. It is not able to find play while previous step of sbt installation went well.


[info] Updated file /home/runner/work/bento/bento/project/ set sbt.version to 1.3.8
[info] Loading project definition from /home/runner/work/bento/bento/project
/home/runner/work/bento/bento/build.sbt:1: error: not found: object play
import play.sbt.PlayImport
/home/runner/work/bento/bento/build.sbt:15: error: not found: value PlayScala
lazy val root = (project in file(".")).enablePlugins(PlayScala)
/home/runner/work/bento/bento/build.sbt:18: error: not found: value ws
/home/runner/work/bento/bento/build.sbt:19: error: not found: value guice
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
##[error]Process completed with exit code 1.


name: Scala CI

    branches: [master]
    branches: [master]


    runs-on: ubuntu-latest

    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
        java-version: 1.8
    - name: Run tests
      run: sbt clean test

Hi @jharitesh108 , 

I tried to use the same scala.yml to build a playframework sample project, the workflow run succeeded . There is my workflow run :

Could you please compare your project with this sample project? Such as the project/plugins.sbt file  ,build.sbt file?

Or would you mind sharing your project here? 

Thanks for ur help. I also created just one starter project and enable github action. It worked. I will compare this with my problematic repo may be some config is not set as per github action expectation. Local build is running without any issue. I will post here later when I get reason. 

Thanks again.

I found the reason. In .gitignore file, I added "


 instead of 


that’s why in local it was ok but on github action’s shell build was failing. A clear error about missing plugins.sbt file would have helped. 

Wow, I am so glad that you have found the root cause.

For the error message improvement, in my opinion , it would be better if you could share your idea with sbt command team . Thank you for your understanding. 

1 Like