Running on Win10. When I start eclipse, I get the following:
Using Java installation of Eclipse
Using JRE from C:\Users\JohnLuss.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_22.0.1.v20240426-1149\jre
Starting SonarLint for Eclipse 10.2.0.81875
SonarLint backend started, instance=org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl@2421cc4
Unable to start request handler
Can’t open directory channel. Log directory fsync won’t be performed.
Node.js could not be automatically detected, has to be configured manually in the SonarLint preferences!
If I search for node.js in the eclipse directory tree, it finds dozens of them, all different sizes. So telling me to just select one manually isn’t much help.
Yeah, this is similar to a bunch of other postings. I’ve been unable to find one that actually provides a solution.
====
Additional note: I posted this assuming it was part of the issue where eclipse is throwing errors while editing source - which seems to happen at random times.
I just opened a source file - and it appears that SonarLint ran - which makes the initial error message posted above even more confusing.
Welcome 
will start testing Eclipse 2024-06 the next days / week.
The latest Eclipse 2024-06 supports Java 22, but ships with \plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530
What’s your Eclipse version ?
Gilbert
Sorry, missed putting that in the msg.
Version: 2024-06 (4.32.0)
Build id: 20240606-1231
Hey @John_Lussmyer,
thanks for reaching out. This is not linked to a specific version of the Eclipse IDE to make it clear.
SonarLint does not search for Node.js in the Eclipse installation as this part is shared among all SonarLint flavors.
SonarLint uses the C:\Windows\System32\where.exe
on Windows and the /usr/bin/which
command on Unix to search for a Node.js executable on the path. See HERE for the implementation.
When Node.js is not found or configured, information will be provided on the log (mostly for debugging) and via a notification (user-facing) saying that it is not available and, therefore, the analysis of JavaScript/TypeScript/CSS is not available.
All other analyzers (like the Secret analyzer) will still run on these files, and there will be no error.
From what I understand, you’d like SonarLint to additionally check the Eclipse installation for a valid Node.js installation? To get rid of additional configuration?
Asking because we have a requirement for a specific version of Node.js. If we search through the whole installation of Eclipse and check every potential Node.js executable for the correct version requirement, the implication is that it would take some time and have an impact on the startup time of SonarLint or the first analyses if we do it in parallel.
On the other hand, there might be users not relying on Node.js (e.g., because they don’t develop with JavaScript/TypeScript/CSS) that don’t even care if it is available or not.
Before making any changes, I’d be interested if all the options already given to “provide” Node.js are not sufficient:
- having Node.js installed locally and configured on the path so it can be found and used not only by SonarLint
- a mostly one-time configuration inside the SonarLint preferences to link the Node.js executable that should be used by SonarLint
- doing the same but configured and imported via Eclipse preferences, this is more for power users who are providing uniform Eclipse installations to their developers for example
Best,
Tobias
For me, the main issue is a very confusing message.
You might want to mention in the error message that node.js is only needed for JavaScript/TypeScript/CSS - as I don’t work with ANY of those. If the msg stated that, I wouldn’t have even bothered to worry about it.
And even if I DID care - there is no clue about what version of node.js is needed.
Looking at my system, it’s obvious that MANY versions are already installed for various other plugins and tools. This means that searching for a “node.js” is completely useless as I would have no idea which one to use.
So, now that I know that I really do NOT need it - I can ignore the error msg that is displayed every time I start Eclipse.
Hi @John_Lussmyer,
ah, now I see. Yes, this can be ignored.
Based on this I feel that the phrasing of the text could be overhauled: To contain the minimum required version as well as the information that it can be ignored if you, the user, don’t work with any of these languages at all.
Thank you for the feedback, even though I jumped on the wrong train in the first place!
Best,
Tobias
1 Like
@John_Lussmyer: I’ve created THIS ticket to improve the messaging. It won’t be part of the next release due to time constraints of the next release, but it should be tackled in the near future.
Thanks again for your feedback!