gpt4 book ai didi

npm - “Failed to load gRPC binary module because it was not installed for the current system”仅在Windows上

转载 作者:行者123 更新时间:2023-12-03 12:29:57 24 4
gpt4 key购买 nike

尝试在Windows上运行打包的应用程序时出现上述错误。它在linux上运行良好。

Expected directory: electron-v2.0-win32-ia32-unknown
Found: node-v57-linux-x64-glibc

这是预期目录应该位于的位置:
"/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node"

package.json
    "dependencies": {
"electron": "^2.0.10",
"firebase": "^5.5.2",
"material-design-lite": "^1.3.0"
},
"devDependencies": {
"electron-packager": "^12.2.0",
"electron-rebuild": "^1.8.2"
}

我尝试过的事情:
  • 重新安装
  • This question

  • 让我知道您是否需要其他详细信息。

    最佳答案

    您必须重新构建您的Electron版本的软件包。
    例如,这是我用来为我的Electron App重建C++包的命令:

    npm rebuild --runtime=electron --target=2.0.11 --disturl=https://atom.io/download/electron --abi=57

    您必须说要npm重建运行时(在这种情况下为Electron),所需的版本目标(在我的情况下为2.0.11),disturl用于下载Electron发行版,最后是您的Electron版本的ABI(您可以获取使用以下命令:electron --abi)

    希望这可以帮到你 :)

    [编辑]

    这是在全局中安装带有Electron的ABI版本的命令:
    Screenshot Electron

    或者在这里,当我想要在我的项目中安装Electron版本和ABI时:
    Screenshot Electron

    关于npm - “Failed to load gRPC binary module because it was not installed for the current system”仅在Windows上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53276898/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com