title: node.js: ng serve --open ― SyntaxError: Unexpected token )
body: <p>I am trying to run a <a href="https://www.youtube.com/watch?v=4oRrXzIXE_E" rel="nofollow noreferrer">demo</a> <code>Angular</code> project in <code>Intellij</code> 2021 (on Ubuntu), and after creating the project, the next step is:</p>
  <p><code>ng serve --open</code> in the terminal.</p>
  <p>Which gives the following error:</p>
  <pre><code>me@me:~/Projects/DemoApp$ ng serve --open
  /home/me/Projects/DemoApp/node_modules/@angular/cli/bin/ng.js:35
    );
    ^
  
  SyntaxError: Unexpected token )
      at exports.runInThisContext (vm.js:53:16)
      at Module._compile (module.js:374:25)
      at Object.Module._extensions..js (module.js:417:10)
      at Module.load (module.js:344:32)
      at Function.Module._load (module.js:301:12)
      at Function.Module.runMain (module.js:442:10)
      at startup (node.js:136:18)
      at node.js:966:3
  me@me:~/Projects/DemoApp$ 
  </code></pre>
  <p>From looking at the code in <code>ng.js</code> it seems like it's a warning about node.js version (it's not clear to me what there is a Syntax Error).</p>
  <p>What should I do to solve this problem?</p>
  <p>I looked at the Intellij project settings, and in the <code>node.js</code> settings I see:</p>
  <p>Node interpreter:
  <code>~/.config/JetBrains/IntelliJIdea/node/node-v14.15.0-linux-x64/bin/node</code></p>
  <p>Package manager:
  <code>~/.config/JetBrains/IntelliJIdea/node/node-v14.15.0-linux-x64/lib/node_modules/npm</code></p>
  <p>In the terminal I get:</p>
  <pre><code>$ nodejs --version
  v4.2.6
  </code></pre>
  <p>and</p>
  <pre><code>$ npm --version
  3.5.2
  </code></pre>