警告:node.js 检测失败,sbt 将使用基于 Rhino 的 Trireme JavaScript 引擎 [英] Warning: node.js detection failed, sbt will use the Rhino based Trireme JavaScript engine
问题描述
我是 Play 框架的新手.请解释以下警告的含义.
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 引擎更改为 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屋!