小编Dyl*_*ele的帖子

将Firebase添加到电子项目的问题,gRPC依赖问题

我已经有这个问题已经有几天了,并且无法找到解决方案.从我的研究看来,这似乎是一个已知问题,但在我的案例中没有提供任何修复工作.

我试过了:

npm rebuild

npm install grpc --runtime=electron --target=1.7.6
Run Code Online (Sandbox Code Playgroud)

我尝试的另一件事是将它添加到package.json文件中:

  "resolutions": {
    "grpc": "^1.12.0"
  },
Run Code Online (Sandbox Code Playgroud)

此外,我已经尝试过更改版本的电子,grpc,firebase.

我一直在控制台上遇到的错误是:

E:\GitHub\Portfolio-Manager\node_modules\grpc\src\grpc_extension.js:53 Uncaught Error: Failed to load gRPC binary module because it was not installed for the current system
    Expected directory: electron-v1.7-win32-x64-unknown
    Found: [node-v59-win32-x64-unknown]
    This problem can often be fixed by running "npm rebuild" on the current system
    Original error: Cannot find module 'E:\GitHub\Portfolio-Manager\node_modules\grpc\src\node\extension_binary\electron-v1.7-win32-x64-unknown\grpc_node.node'
        at Object.<anonymous> (E:\GitHub\Portfolio-Manager\node_modules\grpc\src\grpc_extension.js:53)
        at Object.<anonymous> (E:\GitHub\Portfolio-Manager\node_modules\grpc\src\grpc_extension.js:63)
        at Module._compile (VM129 module.js:571)
        at Object.Module._extensions..js (VM129 module.js:580)
        at Module.load (VM129 module.js:488)
        at tryModuleLoad …
Run Code Online (Sandbox Code Playgroud)

node.js firebase electron

2
推荐指数
1
解决办法
1131
查看次数

标签 统计

electron ×1

firebase ×1

node.js ×1