[英]Cannot find module vertx/container
I installed the latest version of Vert.x , 3.0.0 , and pointed the path in system variables to /bin directory. 我安装了Vert.x的最新版本3.0.0 ,并将系统变量中的路径指向/ bin目录。 I have the latest version of java installed on my machine. 我在计算机上安装了最新版本的Java。 I am getting the following error when trying to run the below code: 尝试运行以下代码时出现以下错误:
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)
My verticle: 我的文字:
var container = require("vertx/container");
container.deployModule("io.vertx~mod-web-server~3.0.0-final", {
port: 8080,
host: "localhost"
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.