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

grpc-tools package does not work with M3 Pro Mac #2646

Open
Lukas-Kullmann opened this issue Jan 18, 2024 · 3 comments
Open

grpc-tools package does not work with M3 Pro Mac #2646

Lukas-Kullmann opened this issue Jan 18, 2024 · 3 comments

Comments

@Lukas-Kullmann
Copy link

Lukas-Kullmann commented Jan 18, 2024

Problem description

When I install grpc-tools and try to run code generation (i.e. node node_modules/.bin/grpc_tools_node_protoc [...]), I get an error

node_modules/.bin/grpc_tools_node_protoc [...]
node:internal/child_process:414
    throw errnoException(err, 'spawn');
    ^

Error: spawn Unknown system error -86
    at ChildProcess.spawn (node:internal/child_process:414:11)
    at spawn (node:child_process:761:9)
    at execFile (node:child_process:351:17)
    at Object.<anonymous> ([..]/node_modules/grpc-tools/bin/protoc.js:39:21)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
    at node:internal/main/run_main_module:23:47 {
  errno: -86,
  code: 'Unknown system error -86',
  syscall: 'spawn'
}

Node.js v18.18.2

I then tried to run the command that the protoc.js file generates directly

node_modules/grpc-tools/bin/protoc --plugin=protoc-gen-grpc=node_modules/grpc-tools/bin/grpc_node_plugin [...]

But that gives me a different error

zsh: bad CPU type in executable: node_modules/grpc-tools/bin/protoc

Reproduction steps

See above.

  • install grpc-tools
  • run node_modules/grpc-tools/bin/protoc --version
  • (you get the same error when running node_modules/grpc-tools/bin/grpc_node_plugin --version)

Environment

  • OS name, version and architecture: MacOS 14.2.1 arm64 (uname -a prints Darwin [device id] 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:51 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6030 arm64)
  • Node version 18.18.2 (also tried 18.19.0)
  • Node installation method volta
  • Package name and version grpc-tools@1.12.4

Additional context

I don't think this library is responsible for building the binary that is not working for me, but I also don't know where else to report this error to.

@sfarg0
Copy link

sfarg0 commented Feb 6, 2024

@Lukas-Kullmann any updates ?

@Lukas-Kullmann
Copy link
Author

I installed rosetta (softwareupdate --install-rosetta via CLI) and now it works. Don't know why I need it though.

@sfarg0
Copy link

sfarg0 commented Feb 6, 2024

Thanks :)

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