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

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.

主站蜘蛛池模板: 长宁县| 民县| 广东省| 山东| 清河县| 龙游县| 柯坪县| 甘洛县| 鄂托克旗| 吉林市| 徐水县| 肃北| 湄潭县| 深泽县| 洞头县| 阳山县| 自治县| 乌拉特前旗| 荆州市| 临猗县| 徐汇区| 阜城县| 西丰县| 南和县| 河间市| 新民市| 东乌| 韶关市| 河池市| 巴林左旗| 博野县| 墨江| 三明市| 五台县| 白城市| 女性| 枞阳县| 东乡县| 彰化县| 河南省| 上蔡县|