Environment Variables – Why JSLint/JSHint Doesn’t Work in Ubuntu

environmentenvironment-variablesjavascriptnodejs

I installed as described here and other places, but after using npm to install jslint, jshint, neither will work. Running "jslint", I only get:

/usr/bin/env: node: No such file or directory

Is there something wrong with the Ubuntu 13.10 repo, or do I have to set up some PATH variable myself?

Best Answer

Due to a conflict with an older "node" package, nodejs gets installed as nodejs instead of node, the latter being what jshint is looking for.

Try this:

sudo ln -s /usr/bin/nodejs /usr/bin/node

For more information, see:

Related Question