Registry / devops / plover-grpc

plover-grpc

JSON →
library1.1.8jsnpmunverified

A Node.js gRPC client library integrated with Eureka service discovery. Version 1.1.8 provides a high-level API for invoking gRPC services via Eureka-registered endpoints. It simplifies configuration and usage for microservice architectures, automatically resolving service instances from Eureka and handling serialization. Release cadence is low (last update: 2019). Differentiates from raw gRPC by adding Eureka integration and a convenient context-based invocation pattern.

npm install plover-grpc
INSTALL
IMPORT
SIG · PLOVER-GRPC
P
plover-grpc
devopsjavascriptv1.1.8
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.

plover-grpc (default)
const ploverGrpc = require('plover-grpc')
import ploverGrpc from 'plover-grpc'
CJS only, no ESM support. Default export is a constructor or factory.
grpc (middleware)
const { grpc } = require('plover-grpc')
const grpc = require('plover-grpc').default
Named export for the middleware/plugin function.
GrpcClient (class)
const { GrpcClient } = require('plover-grpc')
import { GrpcClient } from 'plover-grpc'
CJS only; named export of the client class.

Shows how to integrate plover-grpc middleware with Express, configure Eureka, and call a gRPC service method via the request context.

const { grpc } = require('plover-grpc'); const express = require('express'); const app = express(); app.use(grpc({ root: '/path/to/proto/files', name: 'my-service', version: '1.0.0', user: 'user', password: 'pass', urls: 'http://eureka-server/eureka/apps/', services: { ServiceAPI: 'host:port:serviceName' } })); app.get('/call', async (req, res) => { try { const data = await req.grpc.ServiceAPI.someMethod({ param: JSON.stringify({ pageNum: 0, pageSize: 10 }), apiName: '/someEndpoint/query' }); res.json(data); } catch (err) { res.status(500).send(err.message); } }); app.listen(3000);
Debug
Known issues
breakingRequires Node.js < 14; not compatible with Node 14+ due to grpc native module and deprecated APIs.
fix
Use Node 12 or lower, or migrate to a maintained gRPC client like @grpc/grpc-js.
affects: >=1.1.0
deprecatedPackage has not been updated since 2019; no ESM support, uses deprecated grpc npm package.
fix
Consider switching to modern gRPC client with Eureka or use alternative service discovery.
affects: >=1.0.0
gotchaThe param field must be stringified JSON; passing an object silently fails.
fix
Always use JSON.stringify({...}) for the param parameter.
affects: >=1.0.0
breakingEureka dependency may fail if the service name contains dots or unsupported characters in the URL.
fix
Ensure service names align with Eureka's application ID requirements (hyphens allowed, dots not always).
affects: >=1.0.0
gotchaProtobuf root path resolution: if the root is incorrect, no error is thrown; calls just hang or return empty.
fix
Verify that the root points to the directory containing the .proto files and that imports within them are correct.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'grpc'
The 'grpc' native module is missing or not installed (it's a peer dependency).
fix
npm install grpc@1.24.11
TypeError: req.grpc is undefined
The plover-grpc middleware was not applied or the config is invalid.
fix
Ensure app.use(grpc({...})) is called before your route handlers.
Error: Eureka registration failed: 404
Eureka server URL is incorrect or the service already registered.
fix
Check the 'urls' config and ensure the Eureka instance is running and accessible.
Error: Deadline exceeded
gRPC call timeout; the service might be unreachable or proto definition mismatch.
fix
Verify service host/port in config, check network connectivity and proto file consistency.
Upgrade
Version history
1.1.8latest on npm
Audit
Dependencies
grpcrequiredCore gRPC functionality
eureka-js-clientrequiredService discovery via Eureka
Agent activity
7 hits · last 30 days
node
6
Resources
plover-grpc — npm install plover-grpc · libregistry