Why does my Scala build hang while compiling static assets?

Issue

I see the warning Warning: node.js detection failed, sbt will use the Rhino based Trireme JavaScript engine instead to run JavaScript assets compilation, which in some cases may be orders of magnitude slower than using node.js and then my build hangs.

Resolution

Follow this guide on Using Node.js to Perform JavaScript Optimization for Play and Scala Applications.