官术网_书友最值得收藏!

Verifying installation

Now that Node has been installed successfully, we can go ahead and verify that by running Node from Terminal. Inside Terminal, I'll shut it down by going to Quit Terminal and open it up again:

The reason I'm opening it up is because we've installed a new command, and some Terminals require a restart before they will be able to run that new command.

In our case, we restarted things and we can run our brand new command so, we'll type it:

node -v

What we're doing in this command is we're running the Node command, and we're passing in what's called a flag, a hyphen sign followed by a letter. It could be a, it could be j, or in our case it's v. This command will print the version of Node currently installed.

We might get an error like this:

If you try to run a command that doesn't exist, such as nodeasdf, you'll see command not found. If you see this, it usually means the Node installer didn't work correctly, or you haven't run it in the first place.

In our case though, running Node with the v flag should result in a number. In our case, it's version 9.3.0. If you do have Node installed, and you see something like the following screenshot, then you are done. In the next section, we'll start exploring exactly what Node is.

主站蜘蛛池模板: 扎鲁特旗| 墨玉县| 济阳县| 芜湖市| 潮安县| 独山县| 碌曲县| 阿合奇县| 凌海市| 根河市| 木兰县| 康平县| 北安市| 称多县| 揭东县| 册亨县| 瑞丽市| 斗六市| 白沙| 清河县| 柯坪县| 屏山县| 浠水县| 奉贤区| 乐陵市| 历史| 太白县| 通许县| 禄劝| 米易县| 和龙市| 安宁市| 汾西县| 米林县| 梅州市| 永和县| 德化县| 南川市| 芷江| 额敏县| 嘉善县|