Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load gRPC binary module because it was not installed for the current system Expected directory: electron-v9.2-linux-arm64-glibc #1604

Closed
herico516 opened this issue Oct 20, 2020 · 3 comments

Comments

@herico516
Copy link

Problem description

we build a plugin of the vs code for version 1.50.0 in win_x86_64 is success, but when we build it in the linux arm64 ,an error occurred:
`Activating extension 'xxx.xxx' failed: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: electron-v9.2-linux-arm64-glibc
Found: [node-v72-linux-arm64-glibc]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module '/root/Downloads/20200806_CV1/xxx.xxx/node_modules/grpc/src/node/extension_binary/electron-v9.2-linux-arm64-glibc/grpc_node.node'
Require stack:

  • /root/Downloads/20200806_CV1/xxx.xxx/node_modules/grpc/src/grpc_extension.js
  • /root/Downloads/20200806_CV1/xxx.xxx/node_modules/grpc/src/client_interceptors.js
  • /root/Downloads/20200806_CV1/xxx.xxx/node_modules/grpc/src/client.js
  • /root/Downloads/20200806_CV1/xxx.xxx/node_modules/grpc/index.js
  • /root/Downloads/20200806_CV1/xxx.xxx/rmproto/rm_grpc_pb.js
  • /root/Downloads/20200806_CV1/xxx.xxx/rm_grpc_client.js
  • /root/Downloads/20200806_CV1/xxx.xxx/src/js/connect.js
  • /root/Downloads/20200806_CV1/xxx.xxx/extension.js
  • /usr/share/code/resources/app/out/vs/loader.js
  • /usr/share/code/resources/app/out/bootstrap-amd.js
  • /usr/share/code/resources/app/out/bootstrap-fork.js.`

Environment

  • Linux Ubuntu 18.04 arm64
  • Node version 12.18.0
  • Package name and version [gRPC@1.24.3]

Additional context

use the following command to install grpc
npm install grpc@1.24.3 --target=9.2.1 --runtime=electron
,an error occurred:
`> grpc@1.24.3 install /root/Downloads/20200806_CV1/xxx.xxx/node_modules/grpc

node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.24.3/electron-v9.2-linux-arm64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.24.3 and electron@9.2.1 (electron-v9.2 ABI, glibc) (falling back to source compile with node-gyp)

sh: 1: node-pre-gyp: Permission denied
npm WARN nudt-slurm@0.0.1 No repository field.
npm WARN nudt-slurm@0.0.1 No license field.
npm WARN The package grpc-tools is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! grpc@1.24.3 install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the grpc@1.24.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-10-20T09_41_45_680Z-debug.log`

grpc install fail ,and no refer directory generate in the "node_modules".

@badsyntax
Copy link
Contributor

Have you tried using the pure javascript version? (@grpc/grpc-js) it works fine in a vscode extension.

@murgatroid99
Copy link
Member

I agree with recommending @grpc/grpc-js. The specific error here occurred because we have not yet published binaries for Electron 9.2. Work on that is in progress in #1615 but we have run into some build issues.

@murgatroid99
Copy link
Member

Electron 9.2 binaries have been published with version 1.24.4 of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants