Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

node.js - 命令行上的Node.js版本? (不是REPL)(Node.js version on the command line? (not the REPL))

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

(我想在命令行上获取node.js的版本 - 我希望运行如下命令:)

node -version

but that doesn't work.

(但这不起作用。)

Does anybody know what the command line would be?

(有人知道命令行是什么吗?)

(ie not the REPL)

((即不是REPL))

  ask by hawkeye translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The command line for that is:

(命令行是:)

node -v

Or

(要么)

node --version

Note:

(注意:)

If node -v doesn't work, but nodejs -v does, then something's not set up quite right on your system.

(如果node -v不起作用,但是nodejs -v没有,那么你的系统上没有设置好的东西。)

See this other question for ways to fix it.

(请参阅此其他问题以了解解决方法。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...