Venkat
Venkat

Reputation: 1

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. I have the latest version of java installed on my machine. 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"
});

Upvotes: 0

Views: 1382

Answers (1)

Lakshmikanth
Lakshmikanth

Reputation: 21

For those who also facing this issue on this: The equivalent JavaScript for Vert.x 3 is here on github

No need to require('vertx') anymore, and response is a method now.

Upvotes: 2

Related Questions