A common gRPC client library for Node.js applications built on top of the official @grpc/grpc-js package. Version 1.0.9 provides a simplified interface for creating gRPC connections, managing channels, and handling client lifecycle. It abstracts away complexity of the underlying @grpc/grpc-js API, offering defaults for common scenarios. Suitable for microservices with internal gRPC communication, but may see limited updates due to low activity. Uses Promise-based patterns and supports TLS and insecure connections.
npm install grpc-common-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Two ways to create a gRPC client: using the GrpcClient class for fine-grained control, or the createClient factory for simpler setup with proto file loading.
Install @grpc/proto-loader and pass loaded packageDefinition to GrpcClient or use createClient with protoPath option which handles loading internally (requires @grpc/proto-loader to be installed)
Upgrade: new GrpcClient({ target: '...', credentials: ..., packageDefinition: ..., serviceName: ... })Always specify credentials or use createClient with insecure: true
Replace default import with named import: import { GrpcClient } from 'grpc-common-client'Run 'npm install grpc-common-client' and ensure import is from 'grpc-common-client' (no subpath)
Use GrpcClient.credentials.createInsecure() or import { credentials } from '@grpc/grpc-js'