Registry / communication / pip-services3-grpc-nodex

pip-services3-grpc-nodex

JSON →
library1.1.0jsnpmunverified

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.

npm install pip-services3-grpc-nodex
INSTALL
IMPORT
SIG · PIP-SERVICES3-GRPC
P
pip-services3-grpc-nodex
communicationjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GrpcService
✓ import { GrpcService } from 'pip-services3-grpc-nodex'
✗ import GrpcService from 'pip-services3-grpc-nodex'
Named export, not default. This module is ESM-compatible, but the export is named.
CommandableGrpcService
✓ import { CommandableGrpcService } from 'pip-services3-grpc-nodex'
✗ var CommandableGrpcService = require('pip-services3-grpc-nodex').CommandableGrpcService
CommonJS require works as well, but ESM import is preferred for modern code.
GrpcClient
✓ import { GrpcClient } from 'pip-services3-grpc-nodex'
✗ const { GrpcClient } = require('pip-services3-grpc-nodex')
Both patterns are valid, but the CommonJS pattern may trip up bundlers.
CommandableGrpcClient
✓ import { CommandableGrpcClient } from 'pip-services3-grpc-nodex'
TypeScript types are included; no common wrong import known.

Shows how to create and use a GrpcClient to invoke a remote method via gRPC with Pip.Services configuration.

import { ConfigParams } from 'pip-services3-commons-nodex'; import { GrpcClient } from 'pip-services3-grpc-nodex'; async function main() { // Create client const client = new GrpcClient(); client.configure(ConfigParams.fromTuples( 'connection.protocol', 'http', 'connection.host', 'localhost', 'connection.port', 8090 )); await client.open(null); const request = { message: 'Hello' }; const response = await client.invoke('greeting', null, request); console.log(response); await client.close(null); } main().catch(console.error);
Debug
Known issues
gotchaModule 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.
fix
Use 'pip-services3-node' packages if you need official Pip.Services v3 compatibility.
affects: >=0.0.0
breakingThis version (1.1.0) may have breaking changes from earlier 1.0.x versions, especially in configuration and client methods.
fix
Review the changelog before upgrading from 1.0.x.
affects: >=1.1.0
deprecatedThe package uses the legacy protobuf 'google-protobuf' library and '@grpc/grpc-js'. Future versions may migrate to @grpc/proto-loader or other serialization.
fix
Monitor the package for updates regarding protobuf usage.
affects: >=1.0.0
gotchaRequires Node.js >=14.0.0. Older versions will fail to install or run.
fix
Upgrade Node.js to version 14 or higher.
affects: >=1.0.0
gotchaAll gRPC services and clients must be configured with a 'connection' section in config. Missing connection can cause runtime errors.
fix
Always set connection parameters in config, e.g., via ConfigParams.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'pip-services3-commons-nodex'
Missing peer dependency pip-services3-commons-nodex.
fix
Install it: npm install pip-services3-commons-nodex --save
TypeError: client.invoke is not a function
GrpcClient instance was not opened or improperly configured.
fix
Ensure you called await client.open(null) before invoking; verify your config has a valid gRPC endpoint.
Error: 12 UNIMPLEMENTED: Method not found
The gRPC service does not have the requested method (e.g., 'greeting').
fix
Check the service's commandable interface or define the method in your proto file.
Error: The module 'pip-services3-grpc-nodex' is not compatible with CommonJS module system.
Using require() in an ESM-only context or vice versa.
fix
Use import syntax for ESM or require for CJS: const { GrpcClient } = require('pip-services3-grpc-nodex');
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
pip-services3-commons-nodexrequiredCore Pip.Services interfaces and base classes
pip-services3-components-nodexrequiredProvides component lifecycle and configurations
pip-services3-rpc-nodexrequiredRPC abstractions used by gRPC implementations
google-protobufrequiredProtobuf runtime for serialization
@grpc/grpc-jsrequiredgRPC client and server implementation
Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
2
Resources
pip-services3-grpc-nodex — npm install pip-services3-grpc-nodex · libregistry