在下面有一个相对简单的helloworld.proto文件
syntax = "proto3";
package helloworld;
service Greeter { rpc SayHello(HelloRequest) returns (HelloResponse); }
message HelloRequest { string name = 1; }
message HelloResponse { string message = 1; }
当我运行protoc --js_out=import_style=commonjs,binary:. .\helloworld.proto它时,它会生成一个helloworld_pb.js文件,但它不包括我的Greeter服务和我的SayHellorpc 函数。查看其他一些帖子以及 Google 的参考资料(https://developers.google.com/protocol-buffers/docs/reference/overview),似乎我需要包含一个--plugin选项,但我似乎找不到任何. 有人对此有解决方案吗?