In our new angular application, we are using gRPC for client-server communication. We wrote a few proto files and tried to compile them into typescript files using protoc-gen-ts module. But the generated d.ts files are importing 'grpc' instead of '@grpc/grpc-js' which is failing the build process of app.
Here is a snippet of the generated file (device_management_grpc_pb.d.ts)
// package: device_management
// file: device_management.proto
/* tslint:disable */
/* eslint-disable */
import * as grpc from "grpc";
import * as device_management_pb from `"./device_management_pb";``
We are using the following commands to compile the proto(s) into typescript files:
Further information about the environment are
OS : Ubuntu 20.04.6 LTS
Node : v20.15.1
"@grpc/grpc-js": "^1.9.9",
"grpc_tools_node_protoc_ts": "^5.3.3",
"grpc-tools": "^1.12.4",
"ts-protoc-gen": "^0.15.0",
"typescript": "5.5.4"
Is there any way i can get "@grpc/grpc-js" in generated d.ts files.
Hi Team!
In our new angular application, we are using gRPC for client-server communication. We wrote a few proto files and tried to compile them into typescript files using protoc-gen-ts module. But the generated d.ts files are importing 'grpc' instead of '@grpc/grpc-js' which is failing the build process of app.
Here is a snippet of the generated file (device_management_grpc_pb.d.ts)
We are using the following commands to compile the proto(s) into typescript files:
Further information about the environment are OS : Ubuntu 20.04.6 LTS Node : v20.15.1 "@grpc/grpc-js": "^1.9.9", "grpc_tools_node_protoc_ts": "^5.3.3", "grpc-tools": "^1.12.4", "ts-protoc-gen": "^0.15.0", "typescript": "5.5.4"
Is there any way i can get "@grpc/grpc-js" in generated d.ts files.