indutny / indutny/node-netroute

Error: Module version mismatch. Expected 13, got 11 at bindings.js

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
47
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Hi,
I am trying to use netroute module in my project. When I test it in test.js file and write node test.js everything works as expected. But when I try to load it into my big project I get this error:

```
{"stack":"Error: Module version mismatch. Expected 13, got 11.\n at Module.load (module.js:352:32)\n at Function.Module._load (module.js:308:12)\n at Module.require (module.js:360:17)\n at require (module.js:376:17)\n at bindings (~/node_modules/netroute/node_modules/bindings/bindings.js:74:15)\n at Object.eval (~/node_modules/netroute/lib/netroute.js:3:19)\n at Module._compile (module.js:452:26)\n at Object.Module._extensions..js (module.js:470:10)\n at Module.load (module.js:352:32)\n at Function.Module._load (module.js:308:12)"}
```

I tried running npm update, tried every possible release version of netroute and bindings.js, tried reinstalling all modules with no success.

I have not updated nodejs, and I have checked that there is only one version of npm and nodejs in apt-cache.

Example line that is causing the error but works standalone:

```
console.log(require('netroute').getGateway());
```

What can be the problem? Why does it works standalone and don't work in my project? I am using grunt in my project (starting with grunt start), can the version be configured there or somewhere else?

Thanks

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the require('netroute').getGateway() call both directly with node test.js and through the Grunt project. Inspect lib/netroute.js and the nested node_modules/netroute/node_modules/bindings/bindings.js, then compare the Node.js runtime and native module versions in both contexts. Done means the cause of the ABI mismatch is identified and the project invocation loads netroute successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.