Error in SonarLint for IntelliJ: insufficient privileges at download

Environment:

  • Java: JetBrains s.r.o. 17.0.6
  • OS: Windows 11 amd64
  • IDE: IntelliJ IDEA 2023.1.2
  • SonarLint: 8.2.0.68615
java.lang.IllegalStateException: Invalid Node.js path
	at o.sl.ij.core.NodeJsManager.getNodeJsPathFromConfig(NodeJsManager.java:89)
	at o.sl.ij.core.NodeJsManager.initNodeIfNeeded(NodeJsManager.java:65)
	at o.sl.ij.core.NodeJsManager.getNodeJsPath(NodeJsManager.java:73)
	at o.sl.ij.config.global.SonarLintGlobalOptionsPanel.load(SonarLintGlobalOptionsPanel.java:108)
	at o.sl.ij.config.global.SonarLintGlobalConfigurable.reset(SonarLintGlobalConfigurable.java:134)
	at o.sl.ij.config.global.SonarLintGlobalConfigurable.apply(SonarLintGlobalConfigurable.java:100)
	at c.ij.oa.options.ex.ConfigurableWrapper.apply(ConfigurableWrapper.java:187)
	at c.ij.oa.options.newEditor.ConfigurableEditor.apply(ConfigurableEditor.java:320)
	at c.ij.oa.options.newEditor.SettingsEditor$5.apply(SettingsEditor.java:205)
	at c.ij.oa.options.newEditor.SettingsEditor.apply(SettingsEditor.java:431)
	at c.ij.oa.options.newEditor.SettingsDialog.applyAndClose(SettingsDialog.java:201)
	at c.ij.oa.options.newEditor.SettingsDialog.doOKAction(SettingsDialog.java:193)
	at c.ij.oa.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1863)
	at c.ij.oa.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1817)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)

Hi @christian.jacob,

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.

what is node.js?

Node.js is a JavaScript runtime environment, and to keep it simple, it allows us to analyze some languages (JavaScript and TypeScript).

For now, Node.js >= 14.20 is required to perform analysis on those languages, but we recommend Node.js >= 16.

You can download Node.js on their official website. If the installation went well SonarLint should automatically find Node.js on your path, but if it does not work, you can directly pass the path into the Settings, as mentioned in my previous message.

Perhaps, may you provide more information on how this error happened? It seems you already had a Node.js path inside your SonarLint config, have you done anything related to this?

Hi Nicolas, I don’t use any script language, only Java. So I was a little bit bewildered why I should download something I don’t really need. But I successfully installed it (with minimum options), and now everything works fine. Thanks for your help!