A TypeScript utility library (v1.0.27) that reduces boilerplate for gRPC operations in Node.js. It provides a GrpcClient class that auto-generates promise-based methods from proto definitions, plus helpers like encodeMetadata/decodeMetadata and grpcLoader for loading proto files. Ships with TypeScript types. Suitable for projects using gRPC with Node.js, aiming to simplify client setup and metadata handling. Alternates like @grpc/proto-loader and grpc itself require more manual wiring; grpc-utils abstracts common patterns.
npm install grpc-utilsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a GrpcClient from a proto definition and calls a generated method with async/await.
Check generated method names after upgrade and adjust invocations.
Replace `const grpc = require('grpc')` with `import * as grpc from '@grpc/grpc-js'`.Ensure the first argument is a gRPC client constructor (e.g., from `proto.my_package.MyService`) not an instance.
Install and import @grpc/grpc-js: `npm install @grpc/grpc-js` and add `import * as grpc from '@grpc/grpc-js'`.
Check proto file path and ensure the method exists; generated method names are camelCase of proto RPC names.