Ahmet Eroğlu
Ahmet Eroğlu

Reputation: 724

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

I'm developing a desktop app using electron framework with Typescript. When I try to deploy app with npm start I get the following error:

    Uncaught Error: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: electron-v4.0-darwin-x64-unknown
Found: [node-v64-darwin-x64-unknown]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/Users/ahmet/Documents/JumbleUp-Desktop/node_modules/grpc/src/node/extension_binary/electron-v4.0-darwin-x64-unknown/grpc_node.node'
    at Object.<anonymous> (node_modules/grpc/src/grpc_extension.js:53)
    at Object.<anonymous> (node_modules/grpc/src/grpc_extension.js:63)
    at Module._compile (internal/modules/cjs/loader.js:693)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:704)
    at Module.load (internal/modules/cjs/loader.js:602)
    at tryModuleLoad (internal/modules/cjs/loader.js:541)
    at Function.Module._load (internal/modules/cjs/loader.js:533)
    at Module.require (internal/modules/cjs/loader.js:640)
    at require (internal/modules/cjs/helpers.js:20)
    at Object.<anonymous> (node_modules/grpc/src/client_interceptors.js:144)

Tried many solutions written on the internet but none of them seems to work, thanks in advance.

Upvotes: 1

Views: 1886

Answers (1)

Masiar
Masiar

Reputation: 21352

> npm install electron-rebuild
> ./node_modules/.bin/electron-rebuild

After may tries this worked for me

Upvotes: 1

Related Questions