JezerM / nody-greeter

LightDM greeter that allows to create wonderful themes with web technologies. Made in Node.js
https://web-greeter-page.vercel.app
GNU General Public License v3.0
125 stars 8 forks source link

Error when running npm run build #46

Closed matthieubruneau closed 1 year ago

matthieubruneau commented 1 year ago

Environment

Bug description

Trying to test if nody-greeter succefully built, getting this error like in this issue #31

A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'yargs'
Require stack:
- /opt/nody-greeter/resources/app.asar/js/index.js
-
    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1128)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object.<anonymous> (/opt/nody-greeter/resources/app.asar/js/index.js:30:33)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)

Step tried

I tried to rebuilt the package after removing build/nody-asar, download again, checked if the yargs module was there, keeping the same error.

Any idea on what might be happening?

matthieubruneau commented 1 year ago

I managed to fix the issue by removing all dependencies and then reinstalling them. I now don't have any errors during the npm run build and can set the greeter for lightdm without any issue.

nxta commented 1 year ago

Worked around this by using Node 15 instead of 16