ZeroMQ - Error: Module version mismatch. Expected 46, got 67

93 views Asked by At

While using ZeroMQ messaging in Nodejs getting following error

Error: Module version mismatch. Expected 46, got 67.
    at Error (native)
    at Object.Module._extensions..node (module.js:435:18)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/Documents/HomeApp/node_python/node_modules/zeromq/lib/index.js:6:11)

and here is the code on nodejs server side

app.get("/top", (req, res) => {
  console.log("Here0");
  res.sendFile(__dirname + "/index.html");

  var zerorpc = require("zerorpc");
  var client = new zerorpc.Client({ timeout: 3000, heartbeatInterval: 300000 });
  console.log("Here");
  client.connect("tcp://127.0.0.1:4242");
  console.log("And Here");
  client.invoke("hello", "World!", function(error, res, more) {
    console.log(res);
    if (error) {
      console.error(error);
    }
    console.log(tlist);
    res.send(tlist);
    client.close();
  });

node -v = v4.2.6 npm -v = 6.4.1

Tried

  1. "rm -rf node_modules && npm install" still getting same error

  2. "npm install zeromq --build-from-source" didn't work

I'm blocked at this position. Appreciate any help

0

There are 0 answers