Open
Description
Problem description
When generated, the following files are created:
helloreply.js
hellorequest.js
helloworld_grpc_pb.js
But there is no helloworld_pb.js file.
And in the file helloworld_grpc_pb.js there is a dependency:
var helloworld_pb = require('./helloworld_pb.js');
Reproduction steps
helloworld.proto
syntax = "proto3";
package helloworld;
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
rpc SayHelloStreamReply (HelloRequest) returns (stream HelloReply) {}
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
}
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./static_codegen/ --grpc_out=grpc_js:./static_codegen/ --proto_path=./protos/ ./protos/*.proto
Environment
- Windows 10
- Node v18.17.0
- grpc-tools@1.11.3
Activity
murgatroid99 commentedon Oct 18, 2023
When I run that same command with the same version of grpc-tools in the
examples
directory of this repository (only adjusting the output directory to./helloworld/static_codegen/
), I get the expectedhelloworld_pb.js
.shenqil commentedon Apr 28, 2024
grpc_tools_node_protoc.cmd --js_out=import_style=commonjs,binary:./ --grpc_out=grpc_js:./ helloworld.proto
under windows can be solved