Error in SonarLint for IntelliJ 2023.2 EAP (Community Edition)

Environment:

  • Java: JetBrains s.r.o. 17.0.7
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2023.2 EAP
  • SonarLint: 8.4.0.73538

*** exception class was changed or removed

   cannot reset configurable
   
   java.lang.IllegalStateException: Invalid Node.js path
	at o.sl.ij.core.NodeJsManager.getNodeJsPathFromConfig(NodeJsManager.java:90)
	at o.sl.ij.core.NodeJsManager.initNodeIfNeeded(NodeJsManager.java:66)
	at o.sl.ij.core.NodeJsManager.getNodeJsPath(NodeJsManager.java:74)
	at o.sl.ij.config.global.SonarLintGlobalOptionsPanel.load(SonarLintGlobalOptionsPanel.java:108)
	at o.sl.ij.config.global.SonarLintGlobalConfigurable.reset(SonarLintGlobalConfigurable.java:134)
	at c.ij.oa.options.ex.ConfigurableWrapper.reset(ConfigurableWrapper.java:196)
	at c.ij.oa.options.ex.ConfigurableCardPanel.reset(ConfigurableCardPanel.java:193)
	at c.ij.oa.options.ex.ConfigurableCardPanel.lambda$createConfigurableComponent$4(ConfigurableCardPanel.java:125)
	at c.ij.oa.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:923)
	at c.ij.oa.application.ReadAction.compute(ReadAction.java:76)
	at c.ij.oa.options.ex.ConfigurableCardPanel.createConfigurableComponent(ConfigurableCardPanel.java:112)
	at c.ij.oa.options.ex.ConfigurableCardPanel.create(ConfigurableCardPanel.java:60)
	at c.ij.oa.options.newEditor.ConfigurableEditor$1.create(ConfigurableEditor.java:57)
	at c.ij.oa.options.newEditor.ConfigurableEditor$1.create(ConfigurableEditor.java:54)
	at c.ij.ui.CardLayoutPanel.createValue(CardLayoutPanel.java:73)
	at c.ij.ui.CardLayoutPanel.select(CardLayoutPanel.java:101)

Hi @prajoth89,

It seems your Node.js path is invalid, could you please share with us what you set?
You can retrieve the path under SettingsSonarLint and check the Node.js path field.


The path should be a valid and absolute file path. For information, Node.js allows us to analyze some languages (JavaScript and TypeScript).

Also, could you please provide more information on how this error happened? Have you made any changes related to this path, to Node.js, or to the SonarLint settings in general?

Thank you!

1 Like

Hi Nicolas,

Sorry for the delay in my reply. I noticed that the node js path is wrong after I posted the exception stack trace in the sonarqube community website. I have fixed to the right path and it’s working fine now. Anyways thanks a lot for your help

Prajoth Prasannan

I’m glad the issue got resolved!

Nonetheless, we understand the experience is not ideal and as a result, we created this ticket. We will try to avoid allowing users to set an invalid Node.js path in the settings so that when you restart the IDE it doesn’t show errors.

And thank you for using SonarLint! :sonarlint:

Cool that’s great.