Scanning Node.js App in VSTS CI Build

Must-share information (formatted with Markdown):

  • SonarQube 9.0 Developer Edition
  • Scanning Node Js App
  • Added Steps to scan

Error I am getting when I added steps to scan Node.js app is:-

Below are Config step:-

Error:-

ERROR: D:\agents\02_work\10565\s.scannerwork.sonartmp\eslint-bridge-bundle\package\node_modules\eslint\lib\cli-engine\cli-engine.js:416

ERROR: } catch {

ERROR: ^

ERROR:

ERROR: SyntaxError: Unexpected token {

ERROR: at createScript (vm.js:80:10)

ERROR: at Object.runInThisContext (vm.js:139:10)

ERROR: at Module._compile (module.js:617:28)

ERROR: at Object.Module._extensions…js (module.js:664:10)

ERROR: at Module.load (module.js:566:32)

ERROR: at tryModuleLoad (module.js:506:12)

ERROR: at Function.Module._load (module.js:498:3)

ERROR: at Module.require (module.js:597:17)

ERROR: at require (internal/module.js:11:18)

ERROR: at Object. (D:\agents\02_work\10565\s.scannerwork.sonartmp\eslint-bridge-bundle\package\node_modules\eslint\lib\cli-engine\index.js:3:23)

The operation was canceled.

Hey there.

This error tells me the version of NodeJS is not a good one for analyzing Javascript. Supported versions are current LTS versions (v10, v12, v14) and version v15.

What version of NodeJS is installed on these build agents?