Prerequisite: It has been installed brew
, if not, you can read the previous article Mac OS (forced by helplessness) The complete and successful process of first installing brew (pit mining)
Installing node is very simple, the steps are as follows:
-
Downloading: During
brew install node
this process,brew cleanup
the cache was automatically cleaned up for me. -
Check the download status:
node -v
andnpm -v
-
Download Taobao mirror installation:
npm install -g cnpm --registry=https://registry.npm.taobao.org
(If the permission is not enough, remember to add it at the beginning of the codesudo
)
Finish the installation!