grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.57k stars 763 forks source link

Windows protoc: command not found #845

Closed barrymichaeldoyle closed 4 years ago

barrymichaeldoyle commented 4 years ago

When I try to run the following bash script:

protoc -I=$PROTO_DIR/                                      \
       --js_out=import_style=commonjs:./src/gen \
       --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:./src/gen

I get the following error:

protoc: command not found

I've tried a bunch of stuff and it's not working.

Using Windows.

jvmlet commented 4 years ago

From readme : If you don't already have protoc installed, you will have to download it first from here. https://github.com/protocolbuffers/protobuf/releases

barrymichaeldoyle commented 4 years ago

Done that. What do I do with the download?

stanley-cheung commented 4 years ago

You have to place it somewhere your $PATH can discover it as executable.

barrymichaeldoyle commented 4 years ago

I've done that and I still have the same problem :(

jvmlet commented 4 years ago

Have you extracted the zip file?

barrymichaeldoyle commented 4 years ago

Ahhhh, I've done a bunch more stuff and I've finally gotten it to work. But what's the point of using https://github.com/protocolbuffers/protobuf/releases over this https://github.com/grpc/grpc-web/releases ?

stanley-cheung commented 4 years ago

protoc is the main protocol buffer code generator tool. protoc-gen-grpc-web is a plugin, for protoc, that supplies additional capabilities to generate stub classes for grpc-web services.

rohitkumar9989 commented 2 years ago

Ive extracted the protbuf file but i am still getting the error, I have pasted the extracted file into the directory iam working with, and when i executed the command its still showing the same error please help me with this Screenshot (44) This is the place where i attached the file and image_loc is the file iam working with Thanks in advance

kurushqosimi commented 2 months ago

Have you solved this problem?