Please provide
- Windows 10
- Visual Studio Enterprise 2022 17.8.34525.116
- SonarLint plugin version:7.8.0.88494
- C#, JS, TS
- Is connected mode used:
- Connected to SonarCloud 8.0.0.53978
I am getting the Visual Studio warning “SonarLint: JavaScript/TypeScript analysis failed. Could not find a supported Node…js runtime on your computer.”
In the output screen I get the following:
Current VS version:
Visual Studio Enterprise 2022
17.8.34525.116
17.8.6
[NodeJSLocator] Checking environment variable SONAR_NODEJS_PATH
[NodeJsLocator] Environment variable is not set
[NodeJsLocator] Found incompatible Node.js version: 18.16.0. Path: C:\Program Files\nodejs\node.exe
[NodeJsLocator] Found incompatible Node.js version: 18.16.0. Path: C:\Program Files\nodejs\node.exe
[NodeJsLocator] Found incompatible Node.js version: 18.15.0. Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe
[NodeJsLocator] Found incompatible Node.js version: 16.20.0. Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\ServiceHub\Hosts\ServiceHub.Host.Node.x86\ServiceHub.Host.Node.x86.exe
[NodeJsLocator] Could not find a compatible Node.js version. Supported versions are v14.17+.
[NodeJSLocator] Checking environment variable SONAR_NODEJS_PATH
[NodeJsLocator] Environment variable is not set
It claims to be looking for a version above v14.17 and finds v18.16 which it says is not compatible.
According to your requirements document ( https://docs.sonarsource.com/sonarlint/visual-studio/getting-started/requirements/#nodejs-prerequisites-for-js-and-ts ) the minimum version should be v18.7.1 not the v14.17 as it is reporting.
There are two errors here, the wrong minimum version and not recognizing the discovered version number is valid.
Could you provide any suggestions on how to fix this?