I'm totally new to node.js, so I'm guessing this is a dumb question..
I have an ubuntu machine, on which I have installed browserify with npm:
sudo npm install browserify -g
I can require this module if I open a node.js shell, but when I try to run it from the command line nothing happens:
ubuntu:~$ browserify
ubuntu:~$ browserify f -o f3
ubuntu:~$
whats going on here? The command is found but does nothing and prints nothing??
Thanks
The problem is probably with 'node' vs 'nodejs' environment.
Type which browserify
in your terminal and then edit the file with your preferred text editor: emacs /usr/local/bin/browserify
.
The very first line of the file might read something like #!/usr/bin/env node
. Just change it to call nodejs
instead of node
so that it reads #!/usr/bin/env nodejs
This has to be the the easiest way. And it works with many other tools that depend on node (like coffeescript relp/compiler, mocha testing tool and pretty much anything else that depends on node
)