robvanderleek / mudslide

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

Latest version (0.21.0) fails in Windows 11 64bit stable #54

Closed reddyshyam closed 9 months ago

reddyshyam commented 10 months ago

Throws below error on command line

mudslide.exe login node:internal/modules/cjs/loader:933 const err = new Error(message); ^

Error: Cannot find module './718.index.js' Require stack:

create-issue-branch[bot] commented 9 months ago

Branch issue-54-Latest_version_0_21_0_fails_in_Windows_11_64bit_stable created!

robvanderleek commented 9 months ago

Hi @reddyshyam

This seems to be an issue with the bundler (ncc) and the packager (pkg) I'm using. A summary of my understanding: the packager does not support ESM modules (that some of the third-party libraries from Mudslide use), so I first need to bundle everything using CommonJS modules. However, the bundler generates dynamic require statements that are problematic for some platforms.

I've now explicitly added all the JS files to the Windows in binary, maybe that helps. I don't have access to a Windows platform so please try the 0.21.1 release and let me know.

reddyshyam commented 9 months ago

Hi @reddyshyam

This seems to be an issue with the bundler (ncc) and the packager (pkg) I'm using. A summary of my understanding: the packager does not support ESM modules (that some of the third-party libraries from Mudslide use), so I first need to bundle everything using CommonJS modules. However, the bundler generates dynamic require statements that are problematic for some platforms.

I've now explicitly added all the JS files to the Windows in binary, maybe that helps. I don't have access to a Windows platform so please try the 0.21.1 release and let me know.

Works like a charm👌though exe has become bulky but understandable. Thanks for the quick resolution. 🙏👏