-1

https://docs.nodebb.org/installing/os/ubuntu/

I am following the NodeBB documentation(link attached above) to setup nodeBB locally on my machine - However, I am stuck at "Installing nodeBB" step with the below error.

$ ./nodebb start
/home/pravallika/nodebb/node_modules/commander/lib/command.js:380
    enableOrNameAndArgs = enableOrNameAndArgs ?? 'help [command]';
                                               ^

SyntaxError: Unexpected token ?
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/pravallika/nodebb/node_modules/commander/index.js:2:21)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

Browsed for solutions, I have seen suggestions related to version of nodeJS so I checked it too,I don't think that's the issue. Not sure of how to proceed.

Specs & installations:

$  lsb_release -a  
No LSB modules are available. 
Distributor ID: Ubuntu 
Description:    Ubuntu 20.04.6 
LTS Release:    20.04 
Codename:   focal
$  node -v
v10.19.0
$  npm -v
6.14.4
4
  • Why don't you think the Node version is the issue? v10 is well out of support and specifically can't use nullish coalescing. Commented May 15, 2024 at 10:41
  • 1
    Does this answer your question? SyntaxError: Unexpected token '?' Commented May 15, 2024 at 10:49
  • are you suggesting that I upgrade my node & npm versions? Commented May 15, 2024 at 11:00
  • let me upgrade nodejs and get back here Commented May 15, 2024 at 12:05

1 Answer 1

0

upgrading node version to v22.1.0 resolved the issue

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.