NuSkooler / enigma-bbs

ENiGMA½ BBS Software
https://nuskooler.github.io/enigma-bbs/
BSD 2-Clause "Simplified" License
547 stars 104 forks source link

Syntax error in core/theme.js when running main.js #411

Closed Sanlys closed 2 years ago

Sanlys commented 2 years ago

Describe the Bug Whenever I run ./main.js, I get a syntax error from node.

To Reproduce Installed via "curl -o- https://raw.githubusercontent.com/NuSkooler/enigma-bbs/master/misc/install.sh | bash"

ran "./oputil.js config new" Create a new configuration? y Configuration path: have tried default and /home/vm/config/config.hjson BBS name: default First message conference: default Conference description: default First area in message conference: default Area description: default Logging level: Info

Output: Configuration generated

ran "sudo apt install p7zip lhasa arj lrzsz", no errors

ran "./main.js" in "/home/vm/enigma-bbs" and got the error described below

Expected Behavior According to https://nuskooler.github.io/enigma-bbs/installation/testing.html, this should be outputted instead of the error:

https://nuskooler.github.io/enigma-bbs/assets/images/bkg.png

Actual Behavior it crashes and this is the output: /home/vm/enigma-bbs/core/theme.js:588 if(_.isNumber(options?.position?.row)) { ^

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 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 initMenusAndThemes (/home/vm/enigma-bbs/core/bbs.js:226:42) at /home/vm/enigma-bbs/node_modules/async/dist/async.js:3669:28 at replenish (/home/vm/enigma-bbs/node_modules/async/dist/async.js:446:21)

Screenshots

Screenshot 2022-04-07 at 13 27 35

Environment

NuSkooler commented 2 years ago

Looks like we missed the Node v14 upgrade in the install.sh. Should be resolved with https://github.com/NuSkooler/enigma-bbs/commit/78a24bd8c9793fc9f051c02f8f31f4ccb50e2059 now.