The solution provided by you (OP) will work, but I will give some explanation, show you how to check the problem, provide some other options and maybe some best practices (this is what you were looking for when you sent the answer.
Problem
The problem is that the jshint executable is looking for launch using the "node" interpreter, and the system cannot find the executable that matches the name "node" in your path. (I believe that "node" used to be called the standard name, but now it is usually referred to in "nodejs" because there is a problem with the fact that the name "node" is common and contradicts other executables.)
Here is how you can see what is happening ... On the terminal, do the following: - find the path to the jshint executable by executing "which jshint" (you should find it in "/ usr / local / bin") - view the contents by issuing " cat / usr / local / bin ". You will see that the first line uses an interpreter that is "node" (and not "nodejs").
Cause
Currently, when installing Node.js using the package manager, a Debian package named "nodejs" creates the executable "/ usr / bin / nodejs". Therefore, any other executables that define the "node" executable will not find and will not work.
Correction
You have many options:
The fastest and easiest. Create a symlink (effectively a "shortcut") for "node" that points to "nodejs". You had a version of this in your answer. It is generally accepted that it is better to use this link in the place of your PATH, except in / usr / bin, for example, in / usr / local / bin. The directory is protected, so you need superuser privileges to create the link at the destination. So the command to release:
sudo ln -s / usr / bin / nodejs / usr / local / bin / node "
Alternatively, if you are on a system that does not yet have Node.js (or you are uninstalling the current package) when you install it through the package manager, use the "nodejs-legacy" package (instead of nodejs). This package actually creates a link for you automatically. If you already have Node.js installed, you must first uninstall it.
Finally, you can install Node.js manually or create it. This is more complicated, and I will not try to explain it all here.
Check
You can verify that jshint can start now by issuing the "jshint -version" command, which should now look something like this:
$ jshint --version
jshint v2.5.10
Happy Line!
source share