sonarlint version: 6 , sonarqube version 9.2 , nodejs 16 and configuration : Node.js path is C:\programFile\nodejs but again plaese configure nodejs path in sonarlint setting.
3 Answers
I solved it by setting the path to C:\Program Files\nodejs\node.exe on Sonar lint configuration.
3 Comments
sonarlint.pathToNodeExecutableI had this issue on my VSCode SonarLint failed to analyze JSON code: Node.js runtime version 18.17.0 or later is required. Current version is 18.14.0.
I updated the settings available on sonarlint.pathToNodeExecutable and added this path (Mac): /home/myname/.nvm/versions/node/v20.11.0/bin/node
Comments
Either, configure the Sonar Plugin to use a newer Node install. (Ctrl+, sonarlint.pathToNodeExecutable)
Or, switch to an older version of the Sonar Plugin plugin that's compatible with your existing Node install.
- On the VS Code Extension page, click the gear icon by the SonarLint extension, click Install Another Version, select an older version.
- Disable auto update on the Extensions, so that you can stay on the older Plugin version. (Ctrl+,
Extensions: Auto Update)