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

后端 未结 13 999
不思量自难忘°
不思量自难忘° 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:52

    On an Arm7 (armhf) device running Debian Stretch, I had to issue either of the following:

    $ nodejs -v
    $ nodejs -h
    

    The following did not work:

    $ node -v
    $ node -h
    $ apm -v
    

    Hope this helps someone else.

提交回复
热议问题