SonarLint plugin for Webstorm always reports 0 issues when analysing code with issues

Webstorm version: 2019.3.1
SolarLint plugin version: 4.4.0.14142

Error observed: When analysing code with issues there are 0 issues reported. I know that there are issues because the SolarLint plugin for VSCode reports issues on the same code.

Steps to reproduce: Install SolarLint plugin for Webstorm. Click button “Analyse with SolarLint”. The following error message appears: “No issues found in the current opened file”

The issue has been reproduced on two separate machines.

I have appended the verbose log below. I have reproduced the same issue on another machine, but the the Java exception when running “node -v” did not occur on that machine.

Create : C:\Users\jgreenwood\.WebStorm2019.3\config\sonarlint\plugins
Plugin cache: C:\Users\jgreenwood\.WebStorm2019.3\config\sonarlint\plugins
Create : C:\Users\jgreenwood\.WebStorm2019.3\config\sonarlint\plugins\_tmp
Load plugins
Load plugins (done) | time=35ms
Plugins:
  * SonarScala 1.5.0.315 (sonarscala)
  * SonarPython 1.16.0.4432 (python)
  * SonarJava 5.14.0.18788 (java)
  * SonarHTML 3.2.0.2082 (web)
  * SonarXML 2.0.1.2020 (xml)
  * SonarKotlin 1.5.0.315 (kotlin)
  * SonarPHP 3.2.0.4868 (php)
  * SonarJS 5.2.1.7778 (javascript)
  * SonarRuby 1.5.0.315 (ruby)
Using storage for server 'Test' (last update 17/01/2020, 09:23)
Couldn't get a connected engine to check for update: Project is bound to a project that doesn't exist: Test
Found plugin: sonar-kotlin-plugin-1.5.0.315.jar
Found plugin: sonar-ruby-plugin-1.5.0.315.jar
Found plugin: sonar-html-plugin-3.2.0.2082.jar
Found plugin: sonar-python-plugin-2.3.0.5351.jar
Found plugin: sonar-javascript-plugin-6.1.0.11503.jar
Found plugin: sonar-java-plugin-5.14.0.18788.jar
Found plugin: sonar-php-plugin-3.3.0.5166.jar
Create : C:\Users\jgreenwood\.WebStorm2019.3\config\sonarlint\plugins
Plugin cache: C:\Users\jgreenwood\.WebStorm2019.3\config\sonarlint\plugins
Create : C:\Users\jgreenwood\.WebStorm2019.3\config\sonarlint\plugins\_tmp
Load plugins
Load plugins (done) | time=26ms
Plugins:
  * SonarPython 2.3.0.5351 (python)
  * SonarJava 5.14.0.18788 (java)
  * SonarHTML 3.2.0.2082 (web)
  * SonarKotlin 1.5.0.315 (kotlin)
  * SonarPHP 3.3.0.5166 (php)
  * SonarJS 6.1.0.11503 (javascript)
  * SonarRuby 1.5.0.315 (ruby)
Trigger: ACTION
[Action] 1 file(s) submitted
No analysis configurator found
Analysing 'cpuDashboardImplementation.js'...
Starting analysis with configuration:
[
  baseDir: C:\Program Files\Splunk\etc\apps\TestApp1
  extraProperties: {}
  excludedRules: []
  includedRules: [javascript:S1121, javascript:S1526, javascript:ParsingError, javascript:S2611, javascript:S1125, javascript:S1488, javascript:S3786, javascript:S3828, javascript:S3827, javascript:S3271, javascript:NestedIfDepth, javascript:S3498, javascript:S107, javascript:S2685, javascript:S3499, javascript:S106, javascript:StrictMode, javascript:S105, javascript:S109, javascript:S2208, javascript:TooManyBreakOrContinueInLoop, javascript:ConditionalOperator, javascript:ForIn, javascript:S4624, javascript:S3776, javascript:S1994, javascript:S3533, javascript:S100, javascript:S104, javascript:S103, javascript:S101, javascript:S1067, javascript:S2310, javascript:S3003, javascript:S117, javascript:S1186, javascript:S2550, javascript:ConditionalComment, javascript:S1066, javascript:S3760, javascript:S2392, javascript:S2714, javascript:S2715, javascript:S2713, javascript:S3801, javascript:S3525, javascript:S3800, javascript:S1105, javascript:S1226, javascript:S3524, javascript:S3523, javascript:S3402, javascript:FunctionDeclarationsWithinBlocks, javascript:NamedFunctionExpression, javascript:S2716, javascript:S1192, javascript:S113, javascript:S3353, javascript:S1451, javascript:S2428, javascript:S2549, javascript:S3759, javascript:S3758, javascript:S2427, javascript:S3757, javascript:S2424, javascript:S3514, javascript:S3513, javascript:S3512, javascript:S4326, javascript:S1697, javascript:S3358, javascript:ConstructorFunctionsForSideEffects, javascript:BoundOrAssignedEvalOrArguments, javascript:S122, javascript:S881, javascript:S121, javascript:S125, javascript:S1441, javascript:S2376, javascript:S2770, javascript:S138, javascript:S1440, javascript:ArrayAndObjectConstructors, javascript:S3626, javascript:S3504, javascript:S2138, javascript:S2898, javascript:S3863, javascript:S2817, javascript:S3509, javascript:HtmlComments, javascript:S2762, javascript:S3696, javascript:S1154, javascript:S4144, javascript:S1438, javascript:S2769, javascript:S1439, javascript:S3735, javascript:ContinueStatement, javascript:S1145, javascript:S1541, javascript:S2234, javascript:UnusedFunctionArgument, javascript:S1821, javascript:S3723, javascript:ElseIfWithoutElse, javascript:TrailingWhitespace, javascript:TrailingComma, javascript:SwitchWithoutDefault, javascript:S1134, javascript:TrailingComment, javascript:S1135, javascript:S3798, javascript:S2508]
  inputFiles: [
    file:///C:/Program%20Files/Splunk/etc/apps/TestApp1/appserver/static/cpuDashboardImplementation.js (UTF-8)
  ]
]

Available languages:
  * Python => "py"
  * Java => "java"
  * HTML => "web"
  * JSP => "jsp"
  * Kotlin => "kotlin"
  * PHP => "php"
  * JavaScript => "js"
  * TypeScript => "ts"
  * Ruby => "ruby"
Start analysis
Declared extensions of language Python were converted to py: **/*.py
Declared extensions of language Java were converted to java: **/*.java,**/*.jav
Declared extensions of language HTML were converted to web: **/*.html,**/*.xhtml,**/*.cshtml,**/*.vbhtml,**/*.aspx,**/*.ascx,**/*.rhtml,**/*.erb,**/*.shtm,**/*.shtml
Declared extensions of language JSP were converted to jsp: **/*.jsp,**/*.jspf,**/*.jspx
Declared extensions of language Kotlin were converted to kotlin: **/*.kt
Declared extensions of language PHP were converted to php: **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
Declared extensions of language JavaScript were converted to js: **/*.js,**/*.jsx,**/*.vue
Declared extensions of language TypeScript were converted to ts: **/*.ts,**/*.tsx
Declared extensions of language Ruby were converted to ruby: **/*.rb
Index files
Language of file 'file:///C:/Program%20Files/Splunk/etc/apps/TestApp1/appserver/static/cpuDashboardImplementation.js' is detected to be 'js'
1 file indexed
'JavaSquidSensor' skipped because there is no related file in current project
'Python Sensor' skipped because there is no related file in current project
Execute Sensor: JavaXmlSensor
Execute Sensor: HTML
'Kotlin Sensor' skipped because there is no related file in current project
'PHP sensor' skipped because there is no related file in current project
'Analyzer for "php.ini" files' skipped because there is no related file in current project
Execute Sensor: JavaScript analysis
Deploying bundle
Deploying eslint-bridge into C:\Users\jgreenwood\.WebStorm2019.3\system\tmp\sonarlint\.sonartmp_16054410878248125082\eslint-bridge-bundle
Deploying bundle (done) | time=42992ms
Starting server
Using default Node.js executable: 'node'.
Checking Node.js version
Launching command node -v
Error when running: 'node -v'. Is Node.js available during analysis?
org.sonarsource.nodejs.NodeCommandException: Error when running: 'node -v'. Is Node.js available during analysis?
	at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:83)
	at org.sonarsource.nodejs.NodeCommandBuilderImpl.getVersion(NodeCommandBuilderImpl.java:196)
	at org.sonarsource.nodejs.NodeCommandBuilderImpl.checkNodeCompatibility(NodeCommandBuilderImpl.java:169)
	at org.sonarsource.nodejs.NodeCommandBuilderImpl.build(NodeCommandBuilderImpl.java:144)
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.initNodeCommand(EslintBridgeServerImpl.java:147)
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.startServer(EslintBridgeServerImpl.java:105)
	at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.startServerLazily(EslintBridgeServerImpl.java:167)
	at org.sonar.plugins.javascript.eslint.AbstractEslintSensor.execute(AbstractEslintSensor.java:106)
	at org.sonar.plugins.javascript.eslint.JavaScriptEslintBasedSensor.execute(JavaScriptEslintBasedSensor.java:49)
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:81)
	at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:72)
	at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:134)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
	at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:110)
	at org.sonarsource.sonarlint.core.container.standalone.StandaloneGlobalContainer.analyze(StandaloneGlobalContainer.java:153)
	at org.sonarsource.sonarlint.core.StandaloneSonarLintEngineImpl.analyze(StandaloneSonarLintEngineImpl.java:91)
	at org.sonarlint.intellij.core.StandaloneSonarLintFacade.analyze(StandaloneSonarLintFacade.java:77)
	at org.sonarlint.intellij.core.SonarLintFacade.startAnalysis(SonarLintFacade.java:63)
	at org.sonarlint.intellij.analysis.SonarLintAnalyzer.analyzeModule(SonarLintAnalyzer.java:97)
	at org.sonarlint.intellij.analysis.SonarLintTask.analyze(SonarLintTask.java:181)
	at org.sonarlint.intellij.analysis.SonarLintTask.run(SonarLintTask.java:105)
	at org.sonarlint.intellij.analysis.SonarLintUserTask.run(SonarLintUserTask.java:40)
	at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$runTask$1(SonarLintJobManager.java:120)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
	at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$runTask$2(SonarLintJobManager.java:120)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.IOException: Cannot run program "node": CreateProcess error=2, The system cannot find the file specified
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
	at org.sonarsource.nodejs.NodeCommand$ProcessWrapperImpl.start(NodeCommand.java:175)
	at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:79)
	... 33 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.base/java.lang.ProcessImpl.create(Native Method)
	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:478)
	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:154)
	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
	... 36 more

'TypeScript analysis' skipped because there is no related file in current project
'Ruby Sensor' skipped because there is no related file in current project
Done in 43831ms

Processed 0 issues in 12 ms
Found 0 issues

Hello, thank you for your feedback.

The latest versions of the JavaScript analyzer embedded in SonarLint have a dependency on the Node.js runtime, so you’ll need a recent (8+) node executable in your $PATH.

Thanks for the reply - I knew I would forget to mention something that I did :).

The path statement does include d:\program files\nodejs;, and node -v returns v14.17.0

Any other ideas?

Hello, thank you for coming back :slight_smile:

In recent versions of SonarLint for WebStorm, you can manually specify the full path to the Node executable if it is not correctly detected.

Please also note that recent versions of SonarLint started requiring Node 10+, and that this requirement will soon be bumped to 12+ (so you should be fine with 14+).

So sorry - I thought this was my posting from Friday - that is what I get for trying to do two things at once. Please ignore my comment.

Unless you want to look at my posting from Friday :wink:

No code coverage on .js files - Get help / SonarQube - SonarSource Community

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.