I installed nodejs in C:\\Program Files (x86)\\nodejs
then I created a .js file and saved it in my desktop just to output \'hello world\' in the console:
I also got this issue and this was due to wrong path that we mention while running. Check your file path and also make sure that there is no space between the name of your directory name.