8

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.

1
  • What is the error ?? Commented Jan 8, 2022 at 16:52

3 Answers 3

8

I solved it by setting the path to C:\Program Files\nodejs\node.exe on Sonar lint configuration.

Sign up to request clarification or add additional context in comments.

3 Comments

Hello, could you please specify where does this path should be configured in VSCode?
@jmonloop on vsc settings search for sonarlint.pathToNodeExecutable
Same on linux. I am using nvm to install node. Setting it to /home/myname/.nvm/versions/node/v21.2.0/bin/node solved it for me
3

I 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

1

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)

1 Comment

thanks for the solution. had to downgrade mine to v4.4.2 to work with node.js v16.14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.