I am trying to SonarQube analysis on linux based C project. During sonar-scanner i got below issue:
ERROR: CSS rules were not executed. Only Node.js v10 or later is supported, got 8. org.sonarsource.nodejs.NodeCommandException: Only Node.js v10 or later is supported, got 8.
Please help to resolve it.
SQ Installed Version:
Developer Edition
Version 9.0.1 (build 46107)
I have updated the latest build wrapper, then the issue got disappear.
When i tried to run sonar-scanner, showing analysis was successful but i am unable to see SonarQube report in the server. Later i went trough the logs and observed “Zero files indexed”
Log Snippet:
INFO: Project configuration:
INFO: Included sources: RB_1.5/sys/appl/cli/**, RB_1.5/sys/appl/cei-test/**
INFO: 0 files indexed
INFO: 17268 files ignored because of inclusion/exclusion patterns
INFO: ------------- Run sensors on module EXMUX_4500_PHASE_1.5
Same Error
ERROR: CSS rules were not executed. Only Node.js v10 or later is supported, got 8.
2 org.sonarsource.nodejs.NodeCommandException: Only Node.js v10 or later is supported, got 8.
we dont have any node js files in the repo yet. I tried exclusions of the js files but we don’t have any. But why is it necessary that it throws an exception and is failing in the quality gate
we dont have .css .js/.ts files also in the repo. So is the only option to do it install Node.js version on the agent? No other way
Im sorry ill try to reframe the previous question.
Can I pass any arguments in the jenkins pipeline that can fix the version of nodejs while scanning without installing it on the agent coz I don’t have permissions to install anything on agents.
Your analysis is erroring out at the analysis of JavaScript, not CSS. Yes, there’s an error when the CSS sensor is run, but analysis continues past it to attempt JavaScript analysis.
I think you should re-examine this. Your analysis command line implies that you do: