How to install the Node.js

Here are the steps to install Node.js on a Mac:

1. Visit the Node.js official website:

Open the Node.js official website.

2. Choose a version:

The website will display the latest stable version and the long-term support (LTS) version such as below picture. Depending on your needs, select a version. In general, choosing the LTS version is a good option.

download

3. Run the Node.js installer:

Once the download is complete, run the downloaded installer.

4. Verify the installation:

After installation, you can verify if Node.js and npm were installed successfully by typing the following commands in the Terminal:

node -v
npm -v

If everything is set up correctly, these commands will display the installed versions of Node.js and npm like below picture.

verify

Now, you have successfully installed Node.js. If you need to globally install Node.js modules later on, you can use the npm command.

I hope this helps! Feel free to ask if you have any further questions.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容