question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error Node.js recompile?

See original GitHub issue

Hi,

I have been running Homebridge for a while without much trouble. Was about to install a plugin, but it requires Node.js version over 7.6.0. And I read about it, that uninstalling homebridge and plugins would be the best way to go.

So I saved the config and uninstalled homebridge, npm, nodejs, node-gyp. And then installed everything again: This is the version I am left with now: node -v v8.5.0 npm -v 3.10.10 (which is weird because I told it to install the latest which is 5.4.2, I cannot get it to update over this version?)

And Homebridge 0.4.28.

This is the result when running it and checking the logs: Error: The module '/usr/lib/node_modules/homebridge/node_modules/mdns/build/Release/dns_sd_bindings.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 48. This version of Node.js requires NODE_MODULE_VERSION 57. Please try re-compiling or re-installing the module (for instance, using npm rebuildornpm install). at Object.Module._extensions..node (module.js:653:18) at Module.load (module.js:545:32) at tryModuleLoad (module.js:508:12) at Function.Module._load (module.js:500:3) at Module.require (module.js:568:17) at require (internal/module.js:11:18) at Object.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:24:20) at Module._compile (module.js:624:30) at Object.Module._extensions..js (module.js:635:10) at Module.load (module.js:545:32)

I have tried npm rebuild, no difference. npm install gives me this result: npm WARN saveError ENOENT: no such file or directory, open '/root/package.json' npm WARN enoent ENOENT: no such file or directory, open '/root/package.json' npm WARN root No description npm WARN root No repository field. npm WARN root No README data npm WARN root No license field.

What can I try next?

By the way I had to install homebridge with --unsafe-perm, otherwise I got this error: gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.5.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge/node_modules/curve25519-n2/.node-gyp"

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gwynercommented, Dec 30, 2017

node -v v8.4.0 npm -v 5.3.0

I’m getting the same error message:

Error: The module '/usr/local/lib/node_modules/homebridge/node_modules/mdns/build/Release/dns_sd_bindings.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 48. This version of Node.js requires NODE_MODULE_VERSION 57. Please try re-compiling or re-installing the module (for instance, using npm rebuildornpm install). at Object.Module._extensions..node (module.js:602:18) at Module.load (module.js:507:32) at tryModuleLoad (module.js:470:12) at Function.Module._load (module.js:462:3) at Module.require (module.js:517:17) at require (internal/module.js:11:18) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/mdns/lib/dns_sd.js:24:20) at Module._compile (module.js:573:30) at Object.Module._extensions..js (module.js:584:10) at Module.load (module.js:507:32) `

I’ve deleted homebridge from node_modules and I’ve done sudo npm install --unsafe-perm mdns sudo npm rebuild --unsafe-perm

Any ideas what else I can try?

1reaction
Merlinufcommented, Sep 24, 2017

Well it is the latest node 8.5 that crashes it, had to reinstall homebridge, not fun

Read more comments on GitHub >

github_iconTop Results From Across the Web

Please try re-compiling or re-installing Nodejs - Stack Overflow
Have upgraded our server from Ubuntu-18.04LTS to Ubuntu-20.04LTS After OS upgrade when I'm trying to start a nodejs application, but I get the ......
Read more >
Error Node.js recompile? · Issue #1505 · homebridge ... - GitHub
Hi,. I have been running Homebridge for a while without much trouble. Was about to install a plugin, but it requires Node.js version...
Read more >
Node.JS Compiling error - visual studio - Super User
So I want to compile a nodejs project to one windows executable so I ended up using https://github.com/pmq20/node-packer but when I try to ......
Read more >
How to fix npm start error: rebuild node-sass issue
When running a project that has a dependency on node-sass , you may see an error that says you need to run npm...
Read more >
electron-rebuild - npm
This executable rebuilds native Node.js modules against the version of Node.js that your Electron project is using. This allows you to use ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found