robvanderleek / mudslide

Send WhatsApp messages from the command-line
ISC License
122 stars 12 forks source link

No output from npx mudslide@latest on raspberry pi 4 #36

Closed muttley79 closed 1 year ago

muttley79 commented 1 year ago

Hi I'm using raspberry pi 4 and for some reason I just can't get mudslide to work. It worked before and just stopped but does not give me any debug information.

$ npx mudslide@latest login $

I tried upgrading everything. The binary doesn't work

`$ ./mudslide-linuxstatic-arm64 node:internal/modules/cjs/loader:936 throw err; ^

Error: Cannot find module '/snapshot/dist-ncc/index.js' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function._resolveFilename (pkg/prelude/bootstrap.js:1955:46) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Function.runMain (pkg/prelude/bootstrap.js:1983:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }`

and as for docker, I just can't figure out what I'm doing wrong:

`$ docker run -v /home/user/.local/share/mudslide:/usr/src/app/cache mudslide me node:internal/modules/cjs/loader:1078 throw err; ^

Error: Cannot find module '/me' at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) at Module._load (node:internal/modules/cjs/loader:920:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Node.js v18.15.0`

Needless to say I'm using the latest version

Any help would be apreciated (I have tested the win and x64 binaries and they work. maybe just fix the arm64 MODULE_NOT_FOUND package)

muttley79 commented 1 year ago

The problem was that something was wrong on the .cache folder so I'm closing the issue. However note that there are path problems in the arm64 binary (I compiled it myself and saw... '/snapshot' before node_modules and 'disc-mcc' instead of 'dist'

Thanks anyway

robvanderleek commented 1 year ago

Hi @muttley79

Sorry to hear you bumped into these issues.

I'm using the @vercel/ncc library to bundle all code in a single file and the pkg library to create native binaries from that bundle. There is an open issue for pkg that might be related to the problems you've had with the ARM binary (although I can't explain why other binaries are fine). Unfortunately, I don't have access to a Linux ARM platform for testing.

I've added a short Troubleshooting section to the Readme based on your feedback, thanks.

KR, Rob

muttley79 commented 1 year ago

I now believe that if I've tried "npx mudslide logout" it would have been sorted. I had to add "logger.level = 'trace' " to baylis to unrestand what's going on (I donno how this can be done via command line - would have been handy)

If you need me to test arm64 builds for you I'll be happy to

robvanderleek commented 1 year ago

I've added a global option to increase verbosity: -v. Debug level can be enabled with -vv and trace level with -vvv. Thanks for the suggestion.