1. 安裝NodeJS
????????安裝最新版, 下載地址: http://nodejs.cn/download/
2.? 安裝NPM
$ npm install npm -g
$ npm -v
$ npm config set prefix "D:\nodejs\node_global"
$ npm config set cache "D:\nodejs\node_cache"
3. 添加系統(tǒng)環(huán)境變量
$ NODE_PATH = "D:\nodejs\node_global"
4. 安裝CNPM國內(nèi)鏡像
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
$ cnpm -v
5. 添加Path環(huán)境變量
# cnpm安裝在此目錄,要使用必須指定Path路徑
系統(tǒng)設(shè)置-高級設(shè)置: 在path變量下,添加 D:\nodejs\node_global?
6. 安裝Yarn
$ cnpm install -g yarn
$ yarn config set registry?https://registry.npm.taobao.org
7. 常用命令
$ yarn/npm/cnpm install
$ yarn/npm/cnpm run start?
Ref.
鳴謝!