This is what my file test.js contains:
console.log("Hello Stackoverflow");
This is what happens when I attempt to run it:
$ ls
test.js
$ node test.js
$ node test
$ node "test"
$ node "test.js"
$ node --debug test.js
debugger listening on port 5858
$ node --debug test
debugger listening on port 5858
$
Notice that it never works :( I can run just "node" and evaluate javascript statements line by line but whenever I try to run a script as above it does not work.
I'm running OS X 10.8 and a brand new installation of nodejs.
node testdoesn't return an error. Perhapsnodeis aliased to something.