Our running version is SonarQube 9.9 LTS. However, we are not getting scan coverage for node js. Getting below error -
10:05:20 [ERROR] Error when running: ‘node -v’. Is Node.js available during analysis? 10:05:20 org.sonarsource.nodejs.NodeCommandException: Error when running: ‘node -v’. Is Node.js available during analysis?
We are using SonarQube 9.9 LTS version and it’s running on container, the image we pulled SonarQube provided image only from Docker Hub. How and why we need to install NodeJS separately? Is something we need to mention in pom.xml file?
NodeJS needs to be installed in the environment the scanner is running in (not the SonarQube server). In what environment is the sonar-scanner running (or, more accurately I think, your maven build)?