New to JS ... node using WAMP

OK, so I installed nodeJS and I use WAMP. I go to CMD and type node . It works. Here is my problem:

Test

As you can see, this is not so. When I try to test hello.js . I'm a complete newb ... please help me here?

However, I know PHP and JavaScript ... but it's just that nodeJS ... not very nice.

+4
source share
2 answers

you are trying to run hello.js from node REPL (print-evaluate-print console). Just exit REPL (double ctrl + c) and enter the shell command line "node hello.js"

+5
source

It looks like you are copying commands verbatim, including a shell prompt (Unix). Try ctrl-d or ctrl-z, then enter to exit the comkand Node interface and return to cmd.exe and try your command again.

+1
source

Source: https://habr.com/ru/post/1393284/


All Articles