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.
You need to install Node.js and then tell the sbt/java engine to use it.
brew install node
Edit .bash_profile and add:
export SBT_OPTS="${SBT_OPTS} -Dsbt.jse.engineType=Node -Dsbt.jse.command=$(which node)"
This eliminated the warning for me on OSX
In Windows:
SBT_OPTS
-Dsbt.jse.engineType=Node
to Variable value
SBT_OPTS
to Variable name and -Dsbt.jse.engineType=Node
to Variable value
in ubuntu
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
then add as above to your .profile in your home directory
export SBT_OPTS="${SBT_OPTS} -Dsbt.jse.engineType=Node -Dsbt.jse.command=$(which node)"
then
. ./.profile
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With