js-beautify: command not found in node.js

Why I am unable to run js-beautify? Even after I install it, it doesn't seem to work.

http://pastie.org/8022125

You installed the module locally, which means it's installed in ./node_modules.

The CLI scripts will be installed in ./node_modules/.bin, so you can run them like this:

./node_modules/.bin/js-beautify

However, for modules that install scripts, it's more common to install the module globally, which means it will be installed in a location where the script ends up in a directory that will (probably) be in your $PATH:

[sudo] npm install js-beautify -g