Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non standard Node executable path or name was: Unable to start nodeclipse on ubuntu 14 #158

Closed
broadbear opened this issue Jul 24, 2014 · 6 comments

Comments

@broadbear
Copy link

After a new installation of eclipse/nodeclipse plugin on ubuntu 14, I was unable to restart eclipse. I see the below error in .log. It looks like the binary name is hard coded in the PreferenceInitializer class as 'node', however, on ubuntu there is a package name conflict, so the binary is named 'nodejs.'

!ENTRY org.eclipse.equinox.preferences 4 2 2014-07-23 22:52:07.621
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.equinox.preferences".
!STACK 0
java.lang.IllegalStateException: Could not find Node.js.
        at org.nodeclipse.ui.preferences.PreferenceInitializer.findNode(PreferenceInitializer.java:158)
        at org.nodeclipse.ui.preferences.PreferenceInitializer.initializeDefaultPreferences(PreferenceInitializer.java:92)
        at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper$1.run(PreferenceServiceRegistryHelper.java:300)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.runInitializer(PreferenceServiceRegistryHelper.java:303)
        at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelper.java:131)
        at org.eclipse.core.internal.preferences.PreferencesService.applyRuntimeDefaults(PreferencesService.java:368)
        at org.eclipse.core.internal.preferences.DefaultPreferences.applyRuntimeDefaults(DefaultPreferences.java:166)
        at org.eclipse.core.internal.preferences.DefaultPreferences.load(DefaultPreferences.java:237)
@paulvi
Copy link
Member

paulvi commented Jul 24, 2014

Just check related code
https://github.com/Nodeclipse/nodeclipse-1/blob/master/org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/PreferenceInitializer.java#L135-158

and you see that it can't just find node executable in any places that are usual.
So you just need to install Node.js that is likely missing.

If you really have Node.js executable as nodejs and not node, please continue and give more exactly details about paths, why it is so...

paulvi added a commit that referenced this issue Jul 24, 2014
@paulvi paulvi changed the title Unable to start nodeclipse on ubuntu 14 Non standard Node executable path or name was: Unable to start nodeclipse on ubuntu 14 Jul 24, 2014
@paulvi
Copy link
Member

paulvi commented Jul 24, 2014

A workaround to Eclipse unable to start could be to put some file named node in some standard paths where it should be. Then start Eclipse and specify other Node path.

@paulvi
Copy link
Member

paulvi commented Jul 24, 2014

The bad thing is that I can't really check how it work on Ubuntu and in situation you described.

Could you please get code and build.

@broadbear
Copy link
Author

Here is some additional information:
http://stackoverflow.com/questions/18130164/nodejs-vs-node-on-ubuntu-12-04

A workaround is to create a symlink:
sudo ln -s /usr/bin/nodejs /usr/bin/node

@paulvi
Copy link
Member

paulvi commented Jul 25, 2014

OK, so it is about using Node installed with https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint

I think there should be symlink /usr/bin/node anyway (to run conveniently from command line)

Then Nodeclipse should catch up /usr/bin/node as standard Lunix location.

So while throwing Exception is removed, no new code is needed to handle this special case.

@paulvi paulvi closed this as completed Jul 25, 2014
@paulvi
Copy link
Member

paulvi commented Jul 21, 2015

Or better

sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants