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

node run build failed #30

Closed Crylia closed 1 year ago

Crylia commented 1 year ago

Environment

Bug description

Trying to run npm run build after the other steps fails

Screenshots

╰─ npm run build  

> nody-greeter@1.5.1 build
> npm run build:tsc && node make build

> nody-greeter@1.5.1 build:tsc
> tsc --build && npm run build:themes

> nody-greeter@1.5.1 build:themes
> npm run build:theme:gruvbox && npm run build:theme:dracula

> nody-greeter@1.5.1 build:theme:gruvbox
> tsc --build themes/themes/gruvbox

> nody-greeter@1.5.1 build:theme:dracula
> tsc --build themes/themes/dracula

(node:8639) UnhandledPromiseRejectionWarning: /home/crylia/nody-greeter/build.js:175
    const minor = electronMatch.groups.minor ?? "0";
                                              ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at do_build (/home/crylia/nody-greeter/make.js:73:21)
    at Object.<anonymous> (/home/crylia/nody-greeter/make.js:87:3)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
(node:8639) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:8639) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
JezerM commented 1 year ago

Which Node.js version are you using?

Crylia commented 1 year ago

12.22.9

JezerM commented 1 year ago

Seems the Nullish coalescing operator is only available from Node.js v14 and earlier. Hence, you could try to build nody-greeter with Node.js v14. I didn't consider this when writing the Build dependencies in README; I will fix this mistake soon.

Crylia commented 1 year ago

Jup works, somethines you gotta love outdates packages on ubuntu :roll_eyes: