grpc_tools_node_protoc_ts icon indicating copy to clipboard operation
grpc_tools_node_protoc_ts copied to clipboard

arm arch grpc-tools installation issue

Open sri-vathsa opened this issue 3 years ago • 10 comments

I am using an ubuntu 20 ARM machine and to install grpc_tools_node_protoc_ts globally. Following is the output for the command

/usr/bin/protoc-gen-ts -> /usr/lib/node_modules/grpc_tools_node_protoc_ts/bin/protoc-gen-ts
+ [email protected]
updated 1 package in 0.436s

But I could not use the grpc_tools_node_protoc_plugin(I used the which grpc_tools_node_protoc_plugin to check this). Can someone help me out on how to get the plugin working on my machine?

sri-vathsa avatar Apr 14 '21 18:04 sri-vathsa

Try to replace the which statement to ./node_modules/.bin/grpc_tools_node_protoc_plugin

Use the absolute path to replace.

agreatfool avatar Apr 15 '21 02:04 agreatfool

There is no .bin folder in the node_modules folder and I tried searching for the file globally using sudo find / -name "grpc_tools_node_protoc_plugin" and the only result is /usr/bin/grpc_tools_node_protoc_plugin . When I run file /usr/bin/grpc_tools_node_protoc_plugin I got the following output

/usr/bin/grpc_tools_node_protoc_plugin: broken symbolic link to ../lib/node_modules/grpc-tools/bin/protoc_plugin.js

Then I changed into the above node_modules folder to search for the protoc_plugin.js file using find . -name "protoc_plugin.js" and found no results.

sri-vathsa avatar Apr 15 '21 08:04 sri-vathsa

yarn add grpc-tools to install it to your local repo. then try with node_modules/.bin/...

agreatfool avatar Apr 15 '21 08:04 agreatfool

and you could submit an issue here: https://github.com/grpc/grpc-node, I believe this is the question of node grpc

agreatfool avatar Apr 15 '21 08:04 agreatfool

node grpc does not provide binaries for ARM according to this. Is there any way I can use the plugin without installing the grpc-tools?

sri-vathsa avatar Apr 15 '21 09:04 sri-vathsa

No... as you are trying to generate stub js codes from proto file, this action requires grpc-tools

agreatfool avatar Apr 15 '21 09:04 agreatfool

I read through the ticket you pasted, that's not good, im switching to m1 chip mac soon.

agreatfool avatar Apr 15 '21 09:04 agreatfool

Maybe this ticket would also help.

sri-vathsa avatar Apr 15 '21 09:04 sri-vathsa

For those who are on M1 mac, i made the install work with npm_config_target_arch=x64 npm i grpc-tools. It is probably not the best solution but it is working fine.

Clement-Jean avatar Apr 02 '22 06:04 Clement-Jean

For those who are on M1 mac, i made the install work with npm_config_target_arch=x64 npm i grpc-tools. It is probably not the best solution but it is working fine.

This works

agavitalis avatar Apr 06 '22 11:04 agavitalis