yarn和npm都是一项包管理工具
npm
安装 node.js 之后自带 npm,无需单独安装
测试工具:在命令行输入 npm -v 能有个版本号,就说明工具能用
如果要更新npm,可以使用命令:npm install npm -g
查询当前镜像:npm get registry
设置为淘宝镜像:
npm config set registry http://registry.npm.taobao.org/
设置会默认的官方镜像
npm config set registry https://registry.npmjs.org/
yarn
yarn也是类似于npm的包管理工具
首先需要全局安装yarn