Can't get node.js work in SonarQube

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this
  1. Version used: 8.9.3LTS
  2. Trying to achieve: I always get the error that Node.js seems not to be installed in every project, even though the project is not JavaScript/TypeScript related. I want to get rid of this warning.
  3. Tried so far:
  • downloaded Node.js v16.13.0 and extracted it to /home/sonar/node-16.13.0
  • added sonar.nodejs.executable=/home/sonar/node-16.13.0/bin/node to sonar.properties file → no success
  • tried to add -Dsonar.nodejs.executable=/home/sonar/node-16.13.0/bin/node on sonar-scanner cli → same result:
    ERROR: Provided Node.js executable file does not exist. Property 'sonar.nodejs.executable' was to '/home/sonar/node-16.13.0/bin/node'
  • Executing /home/sonar/node-16.13.0/bin/node gives back the correct version number

Anything I tried did not help. Due to permission rights I cannot install Node.js globally on the entire system, so I though sonar.nodejs.executable might be the right place to get it working, but it did not.

Any ideas? Already searched the web, always got the suggestion to use that parameter in the servers sonar.properties file, which is not working (see above).

Kind regards, Thomas

Hi,

Are there CSS files in your projects? I believe Node.js is used in their analysis as well.

 
Ann