Registry / devops / grpc-echo

grpc-echo

JSON →
library0.0.10jsnpmunverified

grpc-echo is a Node.js HTTP-proxied gRPC debugging client that allows you to call gRPC services without a reflection server. Version 0.0.10 requires Node >=10 and peer dependency gnatch-grpc >1.4.0. It maps gRPC method calls to HTTP POST endpoints, enabling easy debugging with curl or Postman. Streams are not supported. Alternative to grpcurl or reflection-based tools.

npm install grpc-echo
INSTALL
IMPORT
SIG · GRPC-ECHO
G
grpc-echo
devopsjavascriptv0.0.10
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.

default
const watcher = require('grpc-echo');
import watcher from 'grpc-echo';
grpc-echo is CommonJS only; no ESM export.

Sets up an Express HTTP server that proxies POST requests to a gRPC Greeter service running on localhost:50051.

const express = require('express'); const watcher = require('grpc-echo'); const app = express(); const clientConf = { bindPath: 'localhost:50051', services: [ {filename: 'helloworld.proto'}, ] }; const root = '/'; const proxy = watcher({grpcClient: {ggConf: {root: '.proto'}}, clientConf}); app.use(root, proxy); app.listen(3000, () => console.log('HTTP proxy listening on port 3000')); // Then call: curl -X POST http://localhost:3000/proxy/gnat.helloworld.Greeter/SayHello -H "Content-Type: application/json" -d '{"args":{"name":"World"}}'
Debug
Known issues
breakingStreaming RPCs are not supported; calling a streaming method will hang or error.
fix
Only use unary RPCs with grpc-echo.
affects: <=0.0.10
deprecatedThe package grpc-echo has not been updated since 2020 and may not work with modern Node.js or gRPC versions.
fix
Consider alternatives like grpcurl or grpc-reflection.
affects: <=0.0.10
gotchaThe HTTP endpoint path format is /proxy/<package>.<service>/<method>; missing the proxy segment causes 404.
fix
Ensure URL includes /proxy/ before the service path.
affects: <=0.0.10
Errors
Common errors & fixes
Error: Cannot find module 'gnat-grpc'
Missing required peer dependency gnat-grpc.
fix
npm install gnat-grpc@>1.4.0
TypeError: watcher is not a function
Using ES import syntax with a CommonJS module.
fix
Use const watcher = require('grpc-echo'); instead of import.
Error: No service found for filename helloworld.proto
Proto file not found or incorrect root path in ggConf.root.
fix
Ensure ggConf.root points to the directory containing helloworld.proto and its imports.
Upgrade
Version history
0.0.10latest on npm
Audit
Dependencies
gnat-grpcrequiredPeer dependency required for gRPC client functionality
Agent activity
6 hits · last 30 days
node
6
Resources
grpc-echo — npm install grpc-echo · libregistry