Skip to content

helloworld_pb.js file is not generated #2600

Open
@GromovoiStanislav

Description

@GromovoiStanislav

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

murgatroid99 commented on Oct 18, 2023

@murgatroid99
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

shenqil commented on Apr 28, 2024

@shenqil

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @murgatroid99@shenqil@GromovoiStanislav

        Issue actions

          helloworld_pb.js file is not generated · Issue #2600 · grpc/grpc-node