Hello Colin,
I updated my VS Code to the latest version using the official .DMG file from Microsoft themselves.
I am using ‘nvm’ to manage my Node versions to make things more sane instead of having to install individual versions of Node that conflict.
Here is what I am using for the ’ Sonarlint: Path To Node Executable’ setting in VS Code in MacOS:
/home/sbanya/.nvm/versions/node/v18.17.0/bin/node
Here’s the output of ‘nvm’:
sbanya@macboook-osm-sbanya ~/.nvm/versions/node/v18.17.0/bin $ pwd
/Users/sbanya/.nvm/versions/node/v18.17.0/bin
sbanya@macboook-osm-sbanya ~/.nvm/versions/node/v18.17.0/bin $ nvm --version
0.39.3
sbanya@macboook-osm-sbanya ~/.nvm/versions/node/v18.17.0/bin $ nvm alias default v18.17.0
sbanya@macboook-osm-sbanya ~/.nvm/versions/node/v18.17.0/bin $ node --version
v18.17.0
I am running into the same exact issue as mentioned above in which Sonarlint fails with this message:
SonarLint failed to analyze TypeScript code: Node.js runtime version 16.0.0 or later is required.
Here is the corresponding debug output requested earlier as I am using an M1 Macbook running MacOS Sonoma Version 14.3.1
Executing /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/jre/21.0.2-macosx-aarch64.tar/bin/java -jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/server/sonarlint-ls.jar -stdio -analyzers /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonargo.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonarjava.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonarjs.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonarphp.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonarpython.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonarhtml.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonarxml.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonarcfamily.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonartext.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonariac.jar /Users/sbanya/.vscode/extensions/sonarsource.sonarlint-vscode-4.3.0-darwin-arm64/analyzers/sonarlintomnisharp.jar
[stderr] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[stderr] SLF4J: Defaulting to no-operation (NOP) logger implementation
[stderr] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[Debug - 07:47:51.472] Fetching global configuration
[Debug - 07:47:51.507] Queuing analysis of file "file:///Users/sbanya/hub/repos/opti-ui/src/components/VerticalStepper/TravelerDetails/TravelerDetails.tsx" (version 1)
[Debug - 07:47:51.541] Queuing analysis of file "file:///Users/sbanya/hub/repos/opti-ui/src/components/Buttons/OptiIconButton.tsx" (version 1)
No submodules found in '/Users/sbanya/hub/repos/opti-ui' repository. Error:
Error when detecting ignored files:
[Debug - 07:47:51.822] Cached SCM ignore status for file "file:///Users/sbanya/hub/repos/opti-ui/src/components/VerticalStepper/TravelerDetails/TravelerDetails.tsx": Not ignored
[Debug - 07:48:23.401] Fetching configuration for folder 'file:///Users/sbanya/hub/repos/opti-ui'
[Debug - 07:48:23.404] Workspace folder 'WorkspaceFolder[name=opti-ui,uri=file:///Users/sbanya/hub/repos/opti-ui]' configuration updated: WorkspaceFolderSettings[analyzerProperties={sonar.cs.file.suffixes=.cs, sonar.cs.internal.useNet6=true, sonar.cs.internal.loadProjectOnDemand=false, sonar.cs.internal.loadProjectsTimeout=60},connectionId=<null>,pathToCompileCommands=,projectKey=<null>,testFilePattern=]
[Debug - 07:48:23.405] Global settings updated: WorkspaceSettings[connections={},disableTelemetry=false,excludedRules=[],focusOnNewCode=false,includedRules=[],pathToNodeExecutable=/home/sbanya/.nvm/versions/node/v18.17.0/bin/node,ruleParameters={},showAnalyzerLogs=true,showVerboseLogs=true]
[Info - 07:48:23.405] Analyzing file "file:///Users/sbanya/hub/repos/opti-ui/src/components/VerticalStepper/TravelerDetails/TravelerDetails.tsx"...
[Debug - 07:48:23.408] Default settings updated: WorkspaceFolderSettings[analyzerProperties={sonar.cs.file.suffixes=.cs, sonar.cs.internal.useNet6=true, sonar.cs.internal.loadProjectOnDemand=false, sonar.cs.internal.loadProjectsTimeout=60},connectionId=<null>,pathToCompileCommands=,projectKey=<null>,testFilePattern=]
[Debug - 07:48:23.409] Analysis triggered with configuration:
[
baseDir: /Users/sbanya/hub/repos/opti-ui
extraProperties: {sonar.cs.file.suffixes=.cs, sonar.cs.internal.loadProjectsTimeout=60, sonar.cfamily.compile-commands=, sonar.cs.internal.useNet6=true, sonar.cs.internal.loadProjectOnDemand=false}
moduleKey: file:///Users/sbanya/hub/repos/opti-ui
excludedRules: []
includedRules: []
ruleParameters: {}
inputFiles: [
file:///Users/sbanya/hub/repos/opti-ui/src/components/VerticalStepper/TravelerDetails/TravelerDetails.tsx (UTF-8) [ts]
]
]
[Debug - 07:48:23.409] Starting standalone SonarLint engine...
[Debug - 07:48:23.409] Using 11 analyzers
[Debug - 07:48:23.481] Plugin 'JavaScript/TypeScript/CSS Code Quality and Security' requires Node.js 16.0.0. Skip loading it.
[Debug - 07:48:23.491] Loaded 10 plugins
[Debug - 07:48:23.491] * CFamily Code Quality and Security 6.52.0.66181 (cpp)
[Debug - 07:48:23.491] * Python Code Quality and Security 4.14.0.14263 (python)
[Debug - 07:48:23.491] * C# Code Quality and Security (Omnisharp) 1.17.0.82356 (csharp)
[Debug - 07:48:23.491] * Java Code Quality and Security 7.30.1.34514 (java)
[Debug - 07:48:23.491] * HTML Code Quality and Security 3.13.0.4821 (web)
[Debug - 07:48:23.491] * XML Code Quality and Security 2.10.0.4108 (xml)
[Debug - 07:48:23.491] * Go Code Quality and Security 1.15.0.4655 (go)
[Debug - 07:48:23.491] * PHP Code Quality and Security 3.33.0.11274 (php)
[Debug - 07:48:23.491] * IaC Code Quality and Security 1.26.0.8471 (iac)
[Debug - 07:48:23.491] * Text Code Quality and Security 2.8.0.1635 (text)
[Debug - 07:48:24.495] Creating container for module 'file:///Users/sbanya/hub/repos/opti-ui'
[Debug - 07:48:24.508] Standalone SonarLint engine started
[Debug - 07:48:24.560] Start analysis
[Info - 07:48:24.574] Index files
[Debug - 07:48:24.575] Language of file "file:///Users/sbanya/hub/repos/opti-ui/src/components/VerticalStepper/TravelerDetails/TravelerDetails.tsx" is set to "TypeScript"
[Info - 07:48:24.576] 1 file indexed
[Debug - 07:48:24.865] 'JavaSensor' skipped because there is no related files in the current project
[Debug - 07:48:24.866] 'OmniSharp' skipped because there is no related files in the current project
[Debug - 07:48:24.866] 'Python Sensor' skipped because there is no related files in the current project
[Debug - 07:48:24.866] 'IPython Notebooks Sensor' skipped because there is no related files in the current project
[Debug - 07:48:24.866] Execute Sensor: HTML
[Debug - 07:48:24.867] 'XML Sensor' skipped because there is no related files in the current project
[Debug - 07:48:24.867] 'Code Quality and Security for Go' skipped because there is no related files in the current project
[Debug - 07:48:24.867] 'PHP sensor' skipped because there is no related files in the current project
[Debug - 07:48:24.867] 'Analyzer for "php.ini" files' skipped because there is no related files in the current project
[Debug - 07:48:24.867] 'IaC Terraform Sensor' skipped because there is no related files in the current project
[Debug - 07:48:24.867] 'IaC CloudFormation Sensor' skipped because there is no related files in the current project
[Debug - 07:48:24.867] 'IaC Kubernetes Sensor' skipped because there is no related files in the current project
[Debug - 07:48:24.867] 'IaC AzureResourceManager Sensor' skipped because there is no related files in the current project
[Debug - 07:48:24.868] Execute Sensor: TextAndSecretsSensor
[Info - 07:48:25.076] 1 source file to be analyzed
[Info - 07:48:25.130] 1/1 source file has been analyzed
[Debug - 07:48:25.130] Execute Sensor: IaC Docker Sensor
[Info - 07:48:25.132] 0 source files to be analyzed
[Info - 07:48:25.163] 0/0 source files have been analyzed
[Debug - 07:48:25.163] 'CFamily' skipped because there is no related files in the current project
[Warn - 07:48:25.165] Node.js runtime version 16.0.0 or later is required.
[Info - 07:48:25.173] Found 0 issues
No submodules found in '/Users/sbanya/hub/repos/opti-ui' repository. Error:
Error when detecting ignored files:
[Debug - 07:48:25.236] Cached SCM ignore status for file "file:///Users/sbanya/hub/repos/opti-ui/src/components/Buttons/OptiIconButton.tsx": Not ignored
[Info - 07:48:25.236] Analyzing file "file:///Users/sbanya/hub/repos/opti-ui/src/components/Buttons/OptiIconButton.tsx"...
[Debug - 07:48:25.236] Analysis triggered with configuration:
[
baseDir: /Users/sbanya/hub/repos/opti-ui
extraProperties: {sonar.cs.file.suffixes=.cs, sonar.cs.internal.loadProjectsTimeout=60, sonar.cfamily.compile-commands=, sonar.cs.internal.useNet6=true, sonar.cs.internal.loadProjectOnDemand=false}
moduleKey: file:///Users/sbanya/hub/repos/opti-ui
excludedRules: []
includedRules: []
ruleParameters: {}
inputFiles: [
file:///Users/sbanya/hub/repos/opti-ui/src/components/Buttons/OptiIconButton.tsx (UTF-8) [ts]
]
]
[Debug - 07:48:25.249] Start analysis
[Info - 07:48:25.252] Index files
[Debug - 07:48:25.252] Language of file "file:///Users/sbanya/hub/repos/opti-ui/src/components/Buttons/OptiIconButton.tsx" is set to "TypeScript"
[Info - 07:48:25.253] 1 file indexed
[Debug - 07:48:25.283] 'JavaSensor' skipped because there is no related files in the current project
[Debug - 07:48:25.283] 'OmniSharp' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'Python Sensor' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'IPython Notebooks Sensor' skipped because there is no related files in the current project
[Debug - 07:48:25.284] Execute Sensor: HTML
[Debug - 07:48:25.284] 'XML Sensor' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'Code Quality and Security for Go' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'PHP sensor' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'Analyzer for "php.ini" files' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'IaC Terraform Sensor' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'IaC CloudFormation Sensor' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'IaC Kubernetes Sensor' skipped because there is no related files in the current project
[Debug - 07:48:25.284] 'IaC AzureResourceManager Sensor' skipped because there is no related files in the current project
[Debug - 07:48:25.284] Execute Sensor: TextAndSecretsSensor
[Info - 07:48:25.310] 1 source file to be analyzed
[Info - 07:48:25.315] 1/1 source file has been analyzed
[Debug - 07:48:25.315] Execute Sensor: IaC Docker Sensor
[Info - 07:48:25.316] 0 source files to be analyzed
[Info - 07:48:25.320] 0/0 source files have been analyzed
[Debug - 07:48:25.321] 'CFamily' skipped because there is no related files in the current project
[Warn - 07:48:25.321] Node.js runtime version 16.0.0 or later is required.
[Info - 07:48:25.330] Found 0 issues
Next Steps:
Is there any timeline when this issue will be fixed? Thanks!