Node.js Only Displays " ... " when i try and execute files


Ok Whenever I use Node.js, I can execute inline code like: console.log('Hello World'); , Perfectly but, when i try and use: node test/test.js or node test.js, It looks like this:

>node test/test.js

And thats all I get!!! I could never get it to work. I would appreciate it tremendously, thank you all.

Problem courtesy of: SynapseTech


I suspect that you started node by running the executable itself. In this mode you can run the javascript commands directly. But people usually running node scripts from the terminal (Linux/Mac) or command prompt (Windows) as follows:

C:\>node test/test.js

Where C:\ is a path to the current working folder.

Solution courtesy of: AlexAtNet


There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.