{"id":48916,"library":"pip-services3-grpc-nodex","title":"Pip.Services GRPC Client and Server for Node.js","description":"pip-services3-grpc-nodex (v1.1.0) provides GRPC client and server components for the Pip.Services microservices toolkit for Node.js / ES2017. It implements synchronous data exchange via gRPC protocol, including server-side services and client-side clients following the Commandable pattern. Release cadence is low; this is a niche package for the outdated pip-services3-nodex ecosystem (not the current pip-services3-node). Differentiators: integrates with Pip.Services' configuration, logging, and dependency injection. Requires Node >=14 and protobuf dependencies.","status":"active","version":"1.1.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/pip-services3-nodex/pip-services3-grpc-nodex","tags":["javascript","pip.services","microservice","communication","grpc","library","typescript"],"install":[{"cmd":"npm install pip-services3-grpc-nodex","lang":"bash","label":"npm"},{"cmd":"yarn add pip-services3-grpc-nodex","lang":"bash","label":"yarn"},{"cmd":"pnpm add pip-services3-grpc-nodex","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core Pip.Services interfaces and base classes","package":"pip-services3-commons-nodex","optional":false},{"reason":"Provides component lifecycle and configurations","package":"pip-services3-components-nodex","optional":false},{"reason":"RPC abstractions used by gRPC implementations","package":"pip-services3-rpc-nodex","optional":false},{"reason":"Protobuf runtime for serialization","package":"google-protobuf","optional":false},{"reason":"gRPC client and server implementation","package":"@grpc/grpc-js","optional":false}],"imports":[{"note":"Named export, not default. This module is ESM-compatible, but the export is named.","wrong":"import GrpcService from 'pip-services3-grpc-nodex'","symbol":"GrpcService","correct":"import { GrpcService } from 'pip-services3-grpc-nodex'"},{"note":"CommonJS require works as well, but ESM import is preferred for modern code.","wrong":"var CommandableGrpcService = require('pip-services3-grpc-nodex').CommandableGrpcService","symbol":"CommandableGrpcService","correct":"import { CommandableGrpcService } from 'pip-services3-grpc-nodex'"},{"note":"Both patterns are valid, but the CommonJS pattern may trip up bundlers.","wrong":"const { GrpcClient } = require('pip-services3-grpc-nodex')","symbol":"GrpcClient","correct":"import { GrpcClient } from 'pip-services3-grpc-nodex'"},{"note":"TypeScript types are included; no common wrong import known.","wrong":"","symbol":"CommandableGrpcClient","correct":"import { CommandableGrpcClient } from 'pip-services3-grpc-nodex'"}],"quickstart":{"code":"import { ConfigParams } from 'pip-services3-commons-nodex';\nimport { GrpcClient } from 'pip-services3-grpc-nodex';\n\nasync function main() {\n    // Create client\n    const client = new GrpcClient();\n    client.configure(ConfigParams.fromTuples(\n        'connection.protocol', 'http',\n        'connection.host', 'localhost',\n        'connection.port', 8090\n    ));\n    await client.open(null);\n    const request = { message: 'Hello' };\n    const response = await client.invoke('greeting', null, request);\n    console.log(response);\n    await client.close(null);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Shows how to create and use a GrpcClient to invoke a remote method via gRPC with Pip.Services configuration."},"warnings":[{"fix":"Use 'pip-services3-node' packages if you need official Pip.Services v3 compatibility.","message":"Module is part of the 'nodex' variant of Pip.Services which is an independent fork from the official 'pip-services3-node' packages. Not compatible with original Pip.Services v3.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Review the changelog before upgrading from 1.0.x.","message":"This version (1.1.0) may have breaking changes from earlier 1.0.x versions, especially in configuration and client methods.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Monitor the package for updates regarding protobuf usage.","message":"The package uses the legacy protobuf 'google-protobuf' library and '@grpc/grpc-js'. Future versions may migrate to @grpc/proto-loader or other serialization.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Upgrade Node.js to version 14 or higher.","message":"Requires Node.js >=14.0.0. Older versions will fail to install or run.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always set connection parameters in config, e.g., via ConfigParams.","message":"All gRPC services and clients must be configured with a 'connection' section in config. Missing connection can cause runtime errors.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'14':85 'cadenc':51 'client':3,16,43,45 'client-sid':42 'command':48 'communic':92 'compon':19 'configur':78 'current':69 'data':31 'depend':81,88 'differenti':74 'ecosystem':66 'es2017':27 'exchang':32 'follow':46 'grpc':2,11,15,34,93 'implement':29 'includ':36 'inject':82 'integr':75 'javascript':89 'librari':94 'log':79 'low':53 'microservic':23,91 'nich':57 'node':73,84 'node.js':7,26 'nodex':12,65 'outdat':61 'packag':58 'pattern':49 'pip':9,63,71 'pip-services3-grpc-nodex':8 'pip-services3-node':70 'pip-services3-nodex':62 'pip.services':1,22,77,90 'protobuf':87 'protocol':35 'provid':14 'releas':50 'requir':83 'server':5,18,38 'server-sid':37 'servic':40 'services3':10,64,72 'side':39,44 'synchron':30 'toolkit':24 'typescript':95 'v1.1.0':13 'via':33","created_at":"2026-06-07T16:59:07.404160+00:00","updated_at":"2026-06-07T16:59:07.404160+00:00","problems":[{"fix":"Install it: npm install pip-services3-commons-nodex --save","cause":"Missing peer dependency pip-services3-commons-nodex.","error":"Error: Cannot find module 'pip-services3-commons-nodex'"},{"fix":"Ensure you called await client.open(null) before invoking; verify your config has a valid gRPC endpoint.","cause":"GrpcClient instance was not opened or improperly configured.","error":"TypeError: client.invoke is not a function"},{"fix":"Check the service's commandable interface or define the method in your proto file.","cause":"The gRPC service does not have the requested method (e.g., 'greeting').","error":"Error: 12 UNIMPLEMENTED: Method not found"},{"fix":"Use import syntax for ESM or require for CJS: const { GrpcClient } = require('pip-services3-grpc-nodex');","cause":"Using require() in an ESM-only context or vice versa.","error":"Error: The module 'pip-services3-grpc-nodex' is not compatible with CommonJS module system."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/pip-services3-nodex/pip-services3-grpc-nodex#readme","github":"ssh://git@github.com/pip-services3-nodex/pip-services3-grpc-nodex","docs":null,"changelog":null,"pypi":null,"npm":"pip-services3-grpc-nodex","openapi_spec":null,"status_page":null,"smithery":null,"categories":["communication"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}