First time using node.js - “ReferenceError: node is not defined”

后端 未结 7 1963
刺人心
刺人心 2021-02-01 02:47

I just installed node.js. I tried writing node -v that should check the version - and it\'s not working. this is the output:

 > node -v ReferenceError: node          


        
7条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-01 03:49

    It looks like you have entered the node REPL and then typed node -v

    The good news is that this means node is working!

    To check the version from here you can type process.version to get the node version. Alternatively type process.exit() to exit the node REPL and get back to bash (or equivalent terminal).

    From here node -v should just output the node version.

提交回复
热议问题