我正在尝试创建一个gRPC角客户机,如下文章所示:https://anthonygiretti.com/2020/03/29/grpc-asp-net-core-3-1-how-to-create-a-grpc-web-client-examples-with-angular-8-and-httpclient/
在运行命令时
protoc --plugin=protoc-gen-ts="{ABSOLUTEPATH}\node_modules\.bin\protoc-gen-ts.cmd"
--js_out="import_style=commonjs,binary:src/app/generated"
--ts_out="service=grpc-web:src/app/generated" src/app/protos/greet.proto,
我得到一个错误Could not make proto path relative: src/app/protos/greet.proto: No such file or directory
。目录和greet.proto文件绝对存在。
我请求在这个问题上提供帮助。提前谢谢你!
发布于 2020-10-31 22:16:08
对于那些可能遇到这个问题的人,文章的作者给出了答案。
protoc --plugin=protoc-gen-ts="C:/University/IT/Angular_grpc/angular-client/node_modules/ts-protoc-gen/bin/protoc-gen-ts.cmd" --js_out="import_style=commonjs,binary:src/app/generated" --ts_out="service=grpc-web:src/app/generated" src/app/protos/greet.proto
https://stackoverflow.com/questions/64625470
复制相似问题