I came across this error today for the first time:
ERROR: Error when running: 'node -v'. Is Node.js available during analysis?
I know how to fix this, but I have a conceptual question. Why is node.js required to scan Javascript files? I always considered Sonarqube to be a static analysis tool, which by definition means that code is not executed during analysis. So I wonder, what is node being used for?
Incidentally, I have some Javascript projects which are being scanned successfully on this same machine, so I was surprised to come across this error today on a new project. This is with server 7.9.1 and scanner 4.4. It does print out the same error in the logs, but the scan still goes through without error, so the error has not been noticed until now. Maybe because there is not a package.json file in the root directory where the scan takes place or something like that? So, as a follow up question, under what conditions is it possible for Sonarqube to scan JS files without a node executable? How is the analysis different?