警告:node.js检测失败,sbt将使用基于Rhino的Trireme JavaScript引擎 [英] Warning: node.js detection failed, sbt will use the Rhino based Trireme JavaScript engine

查看:149
本文介绍了警告:node.js检测失败,sbt将使用基于Rhino的Trireme JavaScript引擎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是播放框架的新手.请解释以下警告的含义.

I'm new to Play framework. Please explain the meaning of the below warning.

警告:node.js检测失败,sbt将使用基于Rhino的Trireme JavaScript引擎来运行JavaScript资产编译,这在某些情况下可能比使用node.js慢几个数量级

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

我不希望任何事情减慢我的应用程序的速度,因此请提出建议,是否应该将JS Engine更改为Node.js,但是我的PlayFramework项目在服务器端使用Java.

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.

推荐答案

您需要安装Node.js,然后告诉sbt/java引擎使用它.

You need to install Node.js and then tell the sbt/java engine to use it.

  brew install node

编辑.bash_profile并添加:

Edit .bash_profile and add:

   export SBT_OPTS="${SBT_OPTS} -Dsbt.jse.engineType=Node -Dsbt.jse.command=$(which node)"

这消除了在OSX上对我的警告

This eliminated the warning for me on OSX

这篇关于警告:node.js检测失败,sbt将使用基于Rhino的Trireme JavaScript引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆