Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helloworld_pb.js file is not generated #2600

Open
GromovoiStanislav opened this issue Oct 18, 2023 · 2 comments
Open

helloworld_pb.js file is not generated #2600

GromovoiStanislav opened this issue Oct 18, 2023 · 2 comments

Comments

@GromovoiStanislav
Copy link

GromovoiStanislav commented Oct 18, 2023

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
@murgatroid99
Copy link
Member

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 expected helloworld_pb.js.

@shenqil
Copy link

shenqil commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants