博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
命令行上的Node.js版本? (不是REPL)
阅读量:2378 次
发布时间:2019-05-10

本文共 1394 字,大约阅读时间需要 4 分钟。

本文翻译自:

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)


#1楼

参考:


#2楼

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 for ways to fix it. 请参阅以了解解决方法。


#3楼

If you're referring to the shell command line, either of the following will work: 如果您指的是shell命令行,则以下任一操作都可以:

node -vnode --version

Just typing node version will cause node.js to attempt loading a module named version, which doesn't exist unless you like working with confusing module names. 只键入node version将导致node.js尝试加载名为version的模块,除非您喜欢使用令人困惑的模块名称,否则该模块不存在。


#4楼

Try nodejs instead of just node 尝试使用nodejs而不仅仅是node

$ nodejs -vv0.10.25

#5楼

By default node package is nodejs, so use 默认节点包是nodejs,所以使用

$ nodejs -v

or 要么

$ nodejs --version

You can make a link using 您可以使用链接

$ sudo ln -s /usr/bin/nodejs /usr/bin/node

then u can use 然后你可以使用

$ node --version

or 要么

$ node -v

#6楼

Node : 节点

node --version or node -v node --versionnode -v

npm : npm

npm --version or npm -v npm --versionnpm -v

V8 engine version : V8发动机版本

node -p process.versions.v8

转载地址:http://uuexb.baihongyu.com/

你可能感兴趣的文章
用javascript实现本地图片预览(HTML5)
查看>>
C#实现Zip压缩解压实例
查看>>
Android导航图
查看>>
Android学习笔记•从零开始•第一天•基本知识
查看>>
Android学习笔记•从零开始•第二天•Intent-穿梭在Activity之间
查看>>
Android学习笔记•从零开始•第三天•Activity
查看>>
Android学习导航图
查看>>
jQuery EasyUI combotree 只允许选叶子节点
查看>>
升级Windows10![收不到Win10升级预订通知的解决办法]
查看>>
.NET 页面间传值的几种方法
查看>>
asp.net中普通超链接如何触发C#事件
查看>>
div隐藏和显示
查看>>
c#中怎么将string转换成int型
查看>>
圆角table
查看>>
解决无法安装SQL Server 2008 Management Studio Express的问题
查看>>
批量删除Windows7中隧道适配器的方法
查看>>
BlueStacks安卓模拟器屏幕窗口大小的调整方法
查看>>
【越努力,越幸运】
查看>>
C#中的WebBrowser控件的使用
查看>>
WordPress 不能注册中文用户名的解决方法
查看>>