Scala play - “not found: value routes” (Eclipse and IDEA)

前端 未结 7 1801
一整个雨季
一整个雨季 2021-02-20 10:46

Occasionally, and seemingly for no reason, I get \"not found: value routes\" compilation error in one of the view templates (after compilation). This happens either in Eclipse o

7条回答
  •  温柔的废话
    2021-02-20 11:21

    I had such error when tried build Sihouette example project https://github.com/mohiva/play-silhouette-seed/tree/master. I commented or replaced code, that caused error. For example:

    
        def view = silhouette.UnsecuredAction.async { implicit request: Request[AnyContent] =>
            //Future.successful(Ok(views.html.signUp(SignUpForm.form)))
           Future.successful(Ok)
        }
    

    After that build become successful - Twirl and Routes directories created in target/scala-2.X/. I run application and restore original code.

    
        def view = silhouette.UnsecuredAction.async { implicit request: Request[AnyContent] =>
            Future.successful(Ok(views.html.signUp(SignUpForm.form)))
        }
    

提交回复
热议问题