Node.js version on the command line? (not the REPL)

后端 未结 13 1007
不思量自难忘°
不思量自难忘° 2020-12-07 08:01

I want to get the version of Node.js on the command line. I\'m expecting to run a command like:

node -version

but that doesn\'t work. Does

13条回答
  •  一个人的身影
    2020-12-07 08:54

    Node:

    node --version or node -v

    npm:

    npm --version or npm -v

    V8 engine version:

    node -p process.versions.v8
    

提交回复
热议问题