我在 electron 中构建了一个项目,完成后我想将 git 支持添加到应用程序。我尝试通过将NodeGit添加到我的项目中来添加它。简单的
npm install nodegit
并创建文件 git.js 仅
var NodeGit = require("nodegit");
我运行脚本
<script id="git" src="assets/scripts/git.js"></script>
不幸的是,当我尝试运行我的程序时,我遇到了错误:
dyld: lazy symbol binding failed: Symbol not found: _OPENSSL_init_crypto
Referenced from: /[PATH TO PROJECT]/node_modules/nodegit/build/Release/nodegit.node
Expected in: flat namespace
dyld: Symbol not found: _OPENSSL_init_crypto
Referenced from: /[PATH TO PROJECT]/node_modules/nodegit/build/Release/nodegit.node
Expected in: flat namespace
[11635:0118/162433.596391:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596514:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596556:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596638:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596677:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596702:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596730:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596753:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596894:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596933:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596964:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.597001:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
我尝试删除 node_modules 文件夹并再次安装 npm。我尝试 npm 重建。当我输入“node -v”时,我有
V10.15.0
有什么方法可以解决这个问题,或者以不同的方式向电子应用程序添加 git 支持?
感谢您的回答!:)