Setting Node Executable for Typescript Analysis

I have the same issue with sonar.nodejs.executable not working as documented. In our Java/TypeScript project, SonarQube is invoked via SonarScanner for Gradle v3.0. We’re using SonarQube Community LTS Version 7.9.1. When Node.js in on the PATH, everything works. However, Node.js is configured to be downloaded to the project dir by Gradle and everything went haywire since TypeScript analysis was enabled.

I’ve tried to use:

  1. build.gradle:
sonarqube {
    properties {
        //region TypeScript analysis
        property "sonar.nodejs.executable", '{absolute project path}/.gradle/nodejs/node-v12.18.1-darwin-x64/bin/node'
        //endregion
    }
}

or

  1. ./gradlew -Dsonar.nodejs.executable={absolute project path}/.gradle/nodejs/node-v12.18.1-darwin-x64/bin/node clean sonarqube

These fail on Mac or Linux.

What gives?

I’m going to give up on sonar.nodejs.executable for now and set system PATH for Gradle, but it’s less than ideal.