electron - 电子构建 - FileNotFoundError test_sample_json_converter.h
问题描述
按照此说明页面 - https://www.electronjs.org/docs/development/build-instructions-gn构建电子。
我成功地使用了测试构建配置
gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"
在下一步中,当我尝试使用ninja -C out/Testing electron
它进行构建时失败并出现以下错误 -
FileNotFoundError: [Errno 2] No such file or directory: 'gen/third_party/dom_distiller_js/test_sample_json_converter.h'
完整的错误日志
ninja: Entering directory `out/Testing'
[2353/26014] ACTION
//third_party/dom_distiller_js:json_values_converter_tests(//build/toolchain/win:win_clang_x64)
FAILED: gen/third_party/dom_distiller_js/json_values_converter_tests.stamp
C:/depot_tools/bootstrap-2@3_8_10_chromium_17_bin/python3/bin/python3.exe ../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py --stamp gen/third_party/dom_distiller_js/json_values_converter_tests.stamp gen/third_party/dom_distiller_js/test_sample_json_converter.h ../../third_party/dom_distiller_js/test_sample_json_converter.h.golden
Traceback (most recent call last):
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 48, in <module> sys.exit(main())
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 40, in main passed = passed and CompareFiles(i, j)
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 17, in CompareFiles
return open(file1, 'r').read() == open(file2, 'r').read()
FileNotFoundError: [Errno 2] No such file or directory: 'gen/third_party/dom_distiller_js/test_sample_json_converter.h'
[2358/26014] CXX obj/third_party/webrtc/call/bitrate_allocator/bitrate_allocator.obj
ninja: build stopped: subcommand failed.
我搜索了整个目录,只有一个带有test_sample_json_converter.h.golden的文件名。
解决方案
我有同样的问题,这是由于我使用的标签(92.0.4505.0)错过了这个提交:https ://chromium.googlesource.com/chromium/src.git/+/96ec10dd20f2d23e98f93c48991c6ad106308644 。
(有问题的目标是gen/third_party/dom_distiller_js/json_values_converter_tests.stamp
)
推荐阅读
- docker - 如果在 Docker 容器中运行,Nodemailer 无法向 STMP 服务器发送电子邮件
- javascript - 解决猫鼬虚拟财产中的承诺?
- spring-boot - 使用 Spring Cloud Stream Kafka binder 重复消费消息
- xamarin - KeyboardOverlapp 插件在我的 iOS 应用上不起作用
- vue.js - 如何在 vuetify 中使用材质图标
- javascript - 如何让 Angular 拦截器知道某个请求的响应类型是文本而不是 json?
- c++ - 我在哪里可以找到 c++ 中的 qml 类型?
- swift - NSOperation 尚未解除分配
- java - 如何使用我的 persistence.xml 和 datasource-jdbc.xml 进行 jdbc 身份验证?
- django - Django inlineformset:子表单中缺少 PK -> form_set.is_valid() = False