Unable to scan .js files using jenkins

Hi Team,
ERROR: Error when running: ‘C:Program Files -v’. Is Node.js available during analysis?
org.sonarsource.nodejs.NodeCommandException: Error when running: ‘C:Program Files -v’. Is Node.js available during analysis?

i am facing the above issue while scanning the code from SCM using jenkins
i have installed node.js software in jenkins Vm still i am not able to scan .js file
can you help me with the configuration to scan the js files using jenkins

Thanks,
Rakesh

Hi Rakesh, welcome to the SonarSource Community!

node.js must be visible on the PATH at the time the scanner is called by Jenkins, or else can be specified via an analysis parameter as mentioned in our docs:

In order to analyze JavaScript code, you need to have Node.js >= 8 installed on the machine running the scan. If standard node is not available, you have to set property sonar.nodejs.executable to an absolute path to Node.js executable.

1 Like