A library to promisify all gRPC request/response types (unary, client stream, server stream, bidirectional stream) for Node.js. Version 2.4.1 is a fork of grpc-promise with extended metadata support. It provides a consistent promise-based API over the callback-driven @grpc/grpc-js and grpc packages. Key differentiator: supports metadata and deadlines while standardizing stream and unary calls. Maintenance is low, with infrequent releases.
npm install grpc-promise2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a gRPC client, promisify it, and make a unary call using async/await.
Ensure your gRPC client is created with '@grpc/grpc-js' or 'grpc'.
For client streams: promClient.testStreamSimple().write({ id: 1 }).end().sendMessage(). For server streams: promClient.testSimpleStream({ id: 1 }).sendMessage() returns a promise that fulfills when stream ends.Use promClient.testSimpleSimple({ id: 1 }, metadata).sendMessage() instead of options object.Use this fork (grpc-promise2) which is updated for @grpc/grpc-js.
Use type assertions: const response = (await promClient.testMethod(...).sendMessage()) as MyResponseType;
Call makeGrpcClient(client) to return a new client with promisified methods.
Ensure you are using the correct pattern: for unary, call .sendMessage() directly on the returned object; for streams, write/end then call .sendMessage().
Pass metadata as the second argument: client.method(request, metadata).sendMessage()
Verify the method name on the client matches exactly with the rpc name in the .proto file.
No dependency data recorded yet.