Installed [email protected] (also tried @4.0.7) and installed grpc and @grpc/proto-loader. When I launch electron I get a runtime 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
Of course I tried running the suggested solution, npm rebuild, but that did not solve the problem. I also tried rebuilding the grpc module
npm rebuild grpc --build-from-source --runtime=electron --target=4.0.0 --target_archx64 --dturl=https://atom.io/download/electron
I tried uninstalling everything and starting from scratch. We're cloning the electron quick start repo and so after cloning and installing modules I installed grpc targeting a specific version
npm install grpc --runtime=electron --target=<electron version>
Which resulted in the same error so then I tried rebuilding
npm install --save-dev electron-rebuild // to rebuild grpc module
And if I delete node_modules and package-lock.json and then re-install npm install I get a success message (don't pay attention to the version, I'm watching my versions are matching) which looks like the "missing" module was installed
node-pre-gyp WARN Using request for node-pre-gyp https download [grpc]
Success: "/../electron/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" is installed via remote
[email protected] postinstall /../electron/node_modules/protobufjs node scripts/postinstall
[email protected] postinstall /../electron/node_modules/electron node install.js
grpcafter installing it (and after installingelectron-rebuild) ? - Seblor<electron version>in thenpm install grpccommand, instead of giving the version like you do in the first command ? - Seblor