Vue3运行源码-调试报错:Command failed with exit code 128: git rev-parse HEAD
Vue3运行源码-调试报错:Command failed with exit code 128: git rev-parse HEAD
- 下载源码
- 运行源码
- 运行源码报错
- 成功运行
下载源码
官网下载源码地址:https://github.com/vuejs/vue-next
有git的可以克隆:git clone https://github.com/vuejs/vue-next.git
没有git的直接下载源码
运行源码
使用如下命令在cmd中执行,前提是先安装Node.js
# 如果没有安装yarn的需要安装一下
npm install -g yarn --registry=https://registry.npm.taobao.org# 还可以设置一下yarn的国内镜像
yarn config set registry https://registry.npm.taobao.org -g
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g# 安装依赖
yarn# 运行
yarn run dev
运行源码报错
运行出现如下错误:
yarn dev
yarn run v1.22.10
$ node scripts/dev.js
C:\Users\star\Documents\project\vue-next-master\node_modules\execa\index.js:205throw error;^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 <command> [<revision>...] -- [<file>...]'
HEADat makeError (C:\Users\star\Documents\project\vue-next-master\node_modules\execa\lib\error.js:59:11)at Function.module.exports.sync (C:\Users\star\Documents\project\vue-next-master\node_modules\execa\index.js:188:17)at Object.<anonymous> (C:\Users\star\Documents\project\vue-next-master\scripts\dev.js:25:22)at Module._compile (internal/modules/cjs/loader.js:1063:30)at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)at Module.load (internal/modules/cjs/loader.js:928:32)at Function.Module._load (internal/modules/cjs/loader.js:769:14)at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)at internal/main/run_main_module.js:17:47 {shortMessage: 'Command failed with exit code 128: git rev-parse HEAD',command: 'git rev-parse HEAD',exitCode: 128,signal: undefined,signalDescription: undefined,stdout: 'HEAD',stderr: "fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.\n" +"Use '--' to separate paths from revisions, like this:\n" +"'git <command> [<revision>...] -- [<file>...]'",failed: true,timedOut: false,isCanceled: false,killed: false
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.C:\Users\star\Documents\project\vue-next-master>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 <command> [<revision>...] -- [<file>...]'
HEAD
看原因是因为git仓库获取不到head信息,所有就初始化仓库并提交到本地仓库中
# 运行源码需要Git仓库
git init
git add .
git commit "初始化项目"# 如果没有安装yarn的需要安装一下
npm install -g yarn --registry=https://registry.npm.taobao.org# 还可以设置一下yarn的国内镜像
yarn config set registry https://registry.npm.taobao.org -g
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g# 安装依赖
yarn# 运行
yarn run dev
成功运行
这时候运行就成功了,运行成功出现如下信息:
rollup v2.38.5
bundles C:\Users\star\Documents\project\vue-next-master\packages\vue\src\index.ts → packages\vue\dist\vue.global.js...
created packages\vue\dist\vue.global.js in 11.5s[2021-05-02 22:00:57] waiting for changes...
完
如果您觉得帮助到您,感谢【一键三连】么么哒
Vue3运行源码-调试报错:Command failed with exit code 128: git rev-parse HEAD相关推荐
- Android 12源码编译报错:FAILED: out/soong/build.ninja
Android 12源码编译报错:FAILED: out/soong/build.ninja android12源码编译中报如下错误: 网上查了比较多资料发现是swap分区不够导致的,报错时使用fre ...
- Spring源码编译报错那些事
Spring源码编译报错那些事(不会吧不会吧,不会真的有人刚学习源码就被劝退了吧
- 源码编译报错系列之:Fatal error compiling: 无效的标记: --release -> [Help 1]
源码编译报错系列之:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (defau ...
- 古月居 机器人开发实践源码 编译报错问题解决方法
ubuntu:16.04.7 ros:kinetic 移植<机器人开发实践>源码包 ros_exploring,出现的问题都包含于以下内容中. 书中提到,如果将源码包 ros_explor ...
- iOS报错:linker command failed with exit code 1 (use -v to see invocation) 问题解决方式之一
iOS报错:linker command failed with exit code 1 (use -v to see invocation) 问题解决方式之一 参考文章: (1)iOS报错:link ...
- vue-create 报错 command failed: yarn --registry=htt (完美解决方案)
vue-create 报错 command failed: yarn --registry=htt (完美解决方案) 参考文章: (1)vue-create 报错 command failed: ya ...
- 报错IDEA Terminated with exit code 1
参考文章:https://blog.csdn.net/qq_45037155/article/details/124094157 本人亲测,在使用IDEA使用Maven模板创建项目或者在当前项目中Ne ...
- idea 报错Process finished with exit code 1
idea 报错Process finished with exit code 1 当运行测试类时提示找不到测试类 满脸问号 查询一堆解决方式时与我请况均不一致 最终发现问题: 建了两个Module其中 ...
- oracle补丁报错10044,【案例】Oracle补丁 数据库打patch报错OPatch failed with error code 73...
天萃荷净 运维DBA反映在给Oracle数据库安装patch补丁时报错OPatch failed with error code 73,分析原因为相关服务未关闭导致 打patch出现Copy fail ...
最新文章
- van Emda Boas
- 关于:为什么在 Real Producer 10 Plus 里面找不到 RealAudio 10 with aacPlus的解答
- Science封面:三元锂电池安全性差、寿命短问题已解决,来自美国能源部华人团队最新研究...
- 3种设计模式java小程序_Java设计模式之单例模式(3种实现方式)
- 南卫理公会大学计算机科学,南卫理公会大学哪个专业好?
- 理解Linux系统的日志
- 创建型模式二:工厂方法模式
- 产品设计 产品经理 喜欢的网站
- android加号底部导航栏,EasyNavigation Android 底部导航栏████几行代码实现 Tab 导航(随意定制加号,带红点消息提示) @codeKK Android开源站...
- rebase参数以及注意事项
- 不仅有骁龙8 Plus!摩托罗拉新旗舰还要抢首发2亿像素
- blast2go进行Nr注释
- 一加3T解锁OEM、刷入TWRP、第三方ROM以及ROOT
- 产品经理的修炼之道--读后感
- 【干货福利】67个拯救web开发者的工具、库和资源!——爱创课堂
- 李开复写给中国大学生的七封信(3/7)
- Aspose.Words for .NET使用表格教程之水平和垂直合并表格中单元格
- 零基础C++学习(1)——数据类型、运算符和流程图
- Ubuntu22下载安装
- php身份证省市县查询