SQ 8.8 did not report missing node.js in ui when failing CSS scanner

A missing node.js is reported as warning in the Log, but this info is not shown as warning in the web ui.
SQ 8.8 EE latest

Hey there.

I can’t reproduce on my end.

INFO: SonarQube server 8.8.0
ERROR: Failed to parse Node.js version, got 'Couldn't find the Node.js binary. Ensure you have Node.js installed. Open an issue on https://github.com/sindresorhus/run-node'
org.sonarsource.nodejs.NodeCommandException: Failed to parse Node.js version, got 'Couldn't find the Node.js binary. Ensure you have Node.js installed. Open an issue on https://github.com/sindresorhus/run-node'

What’s the exact warning/error you see in your logs? What languages are you analyzing?

1 Like

It is CSS
build 07-Apr-2021 09:44:44 [WARNING] CSS rules were not executed. Error when running: ‘node -v’. Is Node.js available during analysis?

build 07-Apr-2021 09:44:44 [INFO] Sensor CSS Rules [cssfamily] (done) | time=11515ms

build 07-Apr-2021 09:44:44 [INFO] Sensor PL/SQL Sensor [plsql]

build 07-Apr-2021 09:44:44 [WARNING] The Data Dictionary is not configured for PLSQL analyzer which prevents rule(s) S3641, S3921, S3618, S3651 to raise issues.

The CSS warning is not shown, the SQL is shown in the ui

Thanks for the details.

It’s a bit of a funny story (and brand new for me) – our CSS analyser can analyse CSS within non-CSS files (for example, PHP and HTML).

This is great, but can also be noisy if suddenly it’s declared that NodeJS is required for the analysis of these other file types on the off-chance CSS is included (and throw an error + analysis warning in the UI when NodeJS isn’t installed).

So, we decided to only throw an error + analysis warning if actual CSS (.css, .scss, etc.) files are found during the analysis, and otherwise only issue a warning.

That should explain why you only see a warning.

But the problem is also, that the CSS files will not be scanned without Node.js.

Do you have raw CSS files (.css, .scss etc.) files in your project?

Yes and they won’t recognize.

Even after you’ve installed NodeJS? In that case, we’re looking at a different problem. :slight_smile:

This works :wink: