我安装了最新版本的 Vert.x , 3.0.0 ,并将系统变量中的路径指向/ bin目录。我的机器上安装了最新版本的java。尝试运行以下代码时出现以下错误:
C:\Users\test\>vertx run app.js Failed in deploying verticle
javax.script.ScriptException: Error: Cannot find module vertx/container in <eval > at line number 141 at column number 6
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException( NashornScriptEngine.java:467)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptE ngine.java:451)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptE ngine.java:403)
我的垂直:
var container = require("vertx/container");
container.deployModule("io.vertx~mod-web-server~3.0.0-final", {
port: 8080,
host: "localhost"
});