A lightweight utility (v1.4.0) that promisifies all gRPC call types (unary, client/server stream, bidirectional stream) for Node.js, providing a unified Promise-based interface over the native callback/event-based gRPC API. It abstracts away the differences between simple and streaming RPCs, allowing developers to use async/await consistently. Last updated in 2019, it works with the original `grpc` package (not `@grpc/grpc-js`) and is in maintenance mode. Key differentiator: eliminates boilerplate for streaming calls by converting them to promise patterns, though newer alternatives like `@grpc/grpc-js` native promises may be preferred.
npm install grpc-promiseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Promisifies a gRPC client so unary calls return promises, enabling async/await.
Migrate to `@grpc/grpc-js` which has built-in promise support, or use a fork like `grpc-promise-js` if available.
Call promisifyAll only once per proto descriptor, or use promisify on individual methods with grpcPromise.makeUnaryRequest etc.
Attach event listeners (e.g., 'data', 'end') on the returned stream object for server and bidirectional streams.
Consult the API documentation for the correct argument order for each call type.
Use const grpcPromise = require('grpc-promise');Ensure protoDescriptor is loaded and pass it to promisifyAll: grpcPromise.promisifyAll(protoDescriptor);
Check proto file and server implementation for correct method spelling and service registration.