logantgt / harmony-span

A Node.JS application that allows you to trigger external webhooks from your Logitech Harmony Hub and compatible remotes.
MIT License
27 stars 14 forks source link

[Ubuntu Server 18.04] Cannot find module 'node-webhooks' #12

Closed atrus05 closed 3 years ago

atrus05 commented 3 years ago

I downloaded the 1.3 release to my Mac, and then copied it over to my Ubuntu 18.04 Server and placed it in /usr/local/bin/. I then chmoded it according to your readme. Then I connected my hub to my server via USB, and then started up the application. This error is then thrown:


internal/modules/cjs/loader.js:775
    throw err;
    ^

Error: Cannot find module 'node-webhooks'
Require stack:
- /usr/local/bin/HarmonySpan_Linux_x64/__nexe_stdin.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:772:15)
    at Function.Module._load (internal/modules/cjs/loader.js:677:27)
    at Module.require (internal/modules/cjs/loader.js:830:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at Object.<anonymous> (/usr/local/bin/HarmonySpan_Linux_x64/__nexe_stdin.js:2:18)
    at Module._compile (internal/modules/cjs/loader.js:936:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:999:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/usr/local/bin/HarmonySpan_Linux_x64/__nexe_stdin.js' ]
}
logantgt commented 3 years ago

Thank you for opening the issue!

This looks like an issue with how my binary was put together - let me recompile on a Linux machine and I'll throw it back up on the releases page.

logantgt commented 3 years ago

HarmonySpan v1.3.1 just released, download it at https://github.com/AShifter/harmony-span/releases/tag/v1.3.1 - compiled the Linux build on a machine running Ubuntu 20.04 using the same build script, let me know if it works any better!

atrus05 commented 3 years ago

Thanks, and good news: Now it works just fine (well, besides the mobile app issue, but I am sure you will figure that out some day).

On a sidenote, how do you leave it running when closing the ssh shell? Should I detach/attach as a screen session, or do you have anything else that you think should be used for the Linux server users? (as you might have understood I do not have the complete background knowledge about Linux (I am a hobby Linux-dude), so stuff like this I need to ask to make sure I am doing it as intended).

logantgt commented 3 years ago

I would just detach/attach as a screen session - most of my expertise is in Windows so I haven't spent the time figuring out how to get it working in Linux haha.

Feel free to open another issue if you run into trouble! Thank you for the help!