简体   繁体   English

如何检查Node JS是否正确安装?

[英]How to check that Node JS is installed correctly?

I'm completely new to OSX. 我是OSX的新手。 I've tried to install Node JS using Terminal following step-by-step tutorial. 我已按照逐步教程尝试使用Terminal安装Node JS。 How do I check that Node JS is installed successfully? 如何检查Node JS是否已成功安装? Are there any commands or GUI interface equivalent to "Programs and Features" in Windows? Windows中是否有任何等效于“程序和功能”的命令或GUI界面?

Thanks, DV 谢谢,DV

在终端中输入node -v ,如果节点安装正确,您应该会看到显示的节点版本。

The node.js executable (binary) should be node, not nodejs. node.js可执行文件(二进制文件)应该是node,而不是nodejs。 However, there was a naming conflict on some Linux distros (eg, Ubuntu), resulting in the executable getting installed as nodejs. 但是,在某些Linux发行版(例如,Ubuntu)上存在命名冲突,导致可执行文件以nodejs的形式安装。 As of Ubuntu 14.04, for instance, apt-get install nodejs will also install executable node (implemented as a symlink to nodejs). 例如,从Ubuntu 14.04开始,apt-get install nodejs还将安装可执行节点(实现为nodejs的符号链接)。 In other words: For consistency, try node -v first. 换句话说:为了保持一致性,请首先尝试使用节点-v。

$ node -v $节点-v

if symlink was used 如果使用了symlink

$ nodejs -v $ nodejs -v

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM