Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8691

Electronで作成しているアプリケーションでfirebaseモジュールを使おうとした時に発生するエラーの解決[Failed to load gRPC binary module because it was not installed for the current system]

$
0
0

% npm i firebase
を実行して、プログラム内に

constfirebase=require('firebase');

を記述し、% electron .でアプリを起動した際に

Uncaught Error: Failed to load gRPC binary module because it was not installed for the current system

とgrpcモジュールに関するエラーが表示された。

% npm i grpc

を実行したが、今度はgrpcモジュール内にnode_modules/grpc/src/node/extension_binary/electron-v6.0-darwin-x64-unknown/grpc_node.nodeというファイルが無いぞとエラーで怒られる。

さらにnode-v72-darwin-x64-unknown/grpc_node.nodeってファイルならあったけどね!npm rebuildすると治るかも!と書かれていたので愚直に% npm rebuildを実行するも結果は変わらず。

拡張バイナリの中にnode-v72(以下略がありelectron-v6.0(以下略が無いならリビルド時にターゲットを指定してみようと思い、まずelectronのバージョンを確認した。% electron --version

使っていたのはv6.0.10であったため、ランタイムとバージョンを指定してリビルド。% npm rebuild --runtime=electron --target=6.0.10

再度electronアプリを起動すると、エラーも表示されず無事解決した。


Viewing all articles
Browse latest Browse all 8691

Trending Articles