一、github下载源码
1、vue3源码
2、下载3.0.11版本
Download zip
二、环境(Mac)
1、在VS code中打开刚才解压缩的源码
2、打开VS code中的终端界面
输入
yarn install
什么?没装yarn?
那装个呗
npm install -g yarn
mac看👀这里
mac环境zsh: command not found: yarn
备注:如果不用yarn安装用npm安装会报错的
3、跑下试试
yarn dev
哦豁,报错了
Error: Command failed with exit code 128: git rev-parse HEAD
fatal: not a git repository (or any of the parent directories): .git
行吧
输入命令
git init
再跑
yarn dev
又报错了
Error: Command failed with exit code 128: git rev-parse HEAD
fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree.
Use ‘–’ to separate paths from revisions, like this:
‘git […] – […]’