Wednesday 26 April 2017

Can not use grpc_node_plugin to generate *_pb.js file for grpc

I am trying the examples of grpc in nodejs. In the static_codegen example, I can install the protoc. But I still can not generate the static code from "proto" file. I got the error message as following:

protoc --js_out=import_style=commonjs,binary:../node/static_codegen/ --grpc_out=../node/static_codegen --plugin=protoc-gen-grpc=grpc_node_plugin helloworld.proto
grpc_node_plugin: program not found or is not executable
--grpc_out: protoc-gen-grpc: Plugin failed with status code 1.

Also we have two pb.js files, helloworld_grpc_pb.js and helloworld_pb.js. But I can only generate helloworld_pb.js. How can we generate helloworld_grpc_pb.js file?



via xiaoke

No comments:

Post a Comment