MAC(m1)-Install Nodejs

Nodejs official website: Node.js

LTS is the stable version and Current is the latest version.

Download the stable version and install

After the installation is complete, open the terminal and enter the two commands npm -v and node -v,

The version information appears as shown in the figure below, indicating that the installation is successful 

Npm configuration Taobao mirror source (permanent use) 

npm config set registry https://registry.npm.taobao.org

Verify that the setup is successful

npm config get registry

The configuration is successful, now you can use npm install to download things

Installation and use of cnpm_Using cnpm_Code. Kai.'s Blog-CSDN Blog

What is cnpm? How to configure? _What is cnpm_yangfengkeji's blog-CSDN blog

Npm Advanced (1) Replaced with Taobao Mirror Source and cnpm_No Silver Bullet's Blog-CSDN Blog_npm Taobao Mirror and cnpm Mirror

Install cnpm (recommended)

Npm configures Taobao mirror source, so we are not ready to install cnpm

reference:

Install node.js on mac


According to the following experience:

GuLi Mall-everyone open source builds front-end projects_ZHOU_VIP's Blog-CSDN Blog 

1. Do not install too new version, Nodejs18 is too new, and later replaced with Nodejs14

2. Need to install cnpm

sudo npm install -g cnpm --registry=https://registry.npmmirror.com

Guess you like

Origin blog.csdn.net/ZHOU_VIP/article/details/128795381
Recommended