Mac brew安装node环境
原创
©著作权归作者所有:来自51CTO博客作者TBHacker的原创作品,请联系作者获取转载授权,否则将追究法律责任
安装
brew install nodejs
% brew install nodejs
==> Downloading https://mirrors.cloud.tencent.com/homebrew-bottles/bottles/libuv
######################################################################## 100.0%
==> Downloading https://mirrors.cloud.tencent.com/homebrew-bottles/bottles/node-
######################################################################## 100.0%
==> Installing dependencies for node: libuv
==> Installing node dependency: libuv
==> Pouring libuv-1.41.0.arm64_big_sur.bottle.tar.gz
???? /opt/homebrew/Cellar/libuv/1.41.0: 49 files, 3.2MB
==> Installing node
==> Pouring node-16.3.0.arm64_big_sur.bottle.tar.gz
???? /opt/homebrew/Cellar/node/16.3.0: 2,777 files, 48MB
查看版本
% node -v
v16.3.0
% npm -v
7.15.1
安装cnpm
% npm install -g cnpm --registry=https://registry.npm.taobao.org
安装vue
% npm install vue
安装vue-cli
% npm install -g @vue/cli