I'm new to Play framework. Please explain the meaning of the below 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
I don't want anything that slow down my application so please advice if I should change the JS Engine to Node.js, but my PlayFramework project is using Java on the server side.
in Windows 10:
Install node.js from https://nodejs.org/en/ (The installer automatically adds node.js to your PATH)
then add:
to your plugins.sbt in
Worked for me - the warning has disappeared!
EDIT: Apparently plugins.sbt was the wrong place to add the
...although the warning disappeared when loading my app, it led to an error when relaunching the app a couple of hours later:
I would be glad if anyone could help and tell me where to put the export.
in ubuntu
then add as above to your .profile in your home directory
then
to reload your .profile
For a more flexible install using node version manager check the following tutorial: how to install node js on an ubuntu 14.04 server
Build again and the warning about using the Trireme stuff should be gone.
sbt plugins requiring a JS engine are used only in the build process, and so missing Node.js only slows down assets building stages if you use any.
The built application is not affected.
Anyway, you may want to install node.js to your PATH, where it should be auto-detected.
In Windows:
SBT_OPTS
-Dsbt.jse.engineType=Node
to Variable valueSBT_OPTS
to Variable name and-Dsbt.jse.engineType=Node
to Variable valueYou need to install Node.js and then tell the sbt/java engine to use it.
Edit .bash_profile and add:
This eliminated the warning for me on OSX
As an alternative to setting the environment variable, you can add this line to your build.sbt file:
See: https://github.com/sbt/sbt-js-engine