- Visit the official website of nodejs, click the stable version in the blue marquee area, and download https://nodejs.org/en/
- The latest version is 8.1.3. Select the latest version to install. Currently, the newer versions all come with npm, and then execute the installation process.
- Open the Mac command editor and enter the following command to check the node version information:
-
node --version
If you enter information similar to the following, the installation is successful:
-
Enter the following command to check the npm version that comes with node
-
npm --version
If you enter information similar to the following, the installation is successful:
-
-
For some reasons, we also need to install yarn:
-
npm install -g yarn
After the installation is complete, enter the following command to check the installed version:
-
yarn --version
If you enter information similar to the following, the installation is successful:
PS: In addition, you need to install Git, please search for the installation tutorial by yourself