Registry / devops / grpcnode

grpcnode

JSON →
library1.1.1jsnpmunverified

A CLI tool for dynamically creating gRPC clients and servers in Node.js using proto files. Current version 1.1.1. It allows rapid prototyping without code generation: point it at .proto files and JavaScript handler implementations, and it handles server startup or client calls. Supports SSL/TLS, custom include paths, and listing RPC methods. Differentiates from full gRPC frameworks by focusing on quick, dynamic usage.

npm install grpcnode
INSTALL
IMPORT
SIG · GRPCNODE
G
grpcnode
devopsjavascriptv1.1.1
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.

grpcnode (CLI)
npx grpcnode server example.proto handler.js
ing importing as a library module
grpcnode is a CLI tool, not a library. Use npx or global install.
grpc-server
grpcnode server -I proto/ protofile.proto handler.js
grpcnode server protofile.proto handler.js
Include path (-I) required if proto imports are relative.
grpcnode client ls
grpcnode client ls -I proto/ helloworld.proto
grpcnode client ls helloworld.proto
Without -I, may fail to resolve imports in proto file.

Starts a gRPC server using a proto file and a JavaScript handler implementation. The handler file exports functions matching RPC methods.

npx grpcnode server -I ./example ./example/helloworld.proto ./example/helloworld.js
Debug
Known issues
breakingOnly one root include path supported via -I flag. Nested imports may break.
fix
Use -I with the single root directory; avoid complex import structures.
affects: >=1.0.0
deprecatedUses @grpc/grpc-js (not grpc). Proto file loading is dynamic and may not support all proto features.
fix
Verify proto compatibility; consider using protobufjs for full feature support.
affects: >=1.1.0
gotchaSSL certificates in command line may expose secrets in process list.
fix
Use environment variables or config files instead of inline certs.
affects: >=1.0.0
gotchaClient expects JSON stringified arguments; malformed JSON causes silent failures.
fix
Always validate JSON with JSON.parse before passing to -c flag.
affects: >=1.0.0
breakingDropped support for plain grpc package (0.x). Uses @grpc/grpc-js only.
fix
Ensure your Node.js version supports @grpc/grpc-js (Node >= 8).
affects: >=1.0.0
deprecatedProto file glob patterns (e.g., *.proto) may be resolved inconsistently across platforms.
fix
List each proto file explicitly instead of using wildcards.
affects: >=1.0.0
Errors
Common errors & fixes
Error: ENOENT: no such file or directory, open 'ca.crt'
SSL certificate file path not found; relative paths resolved from current working directory.
fix
Use absolute paths for --ca, --key, --cert flags.
Error: Cannot find module './handler'
Handler file path is relative to current directory, not the proto file location.
fix
Provide absolute path or properly relative path to the JavaScript handler.
Error: 2 UNKNOWN: No method found for /helloworld.v1.Greeter/SayGoodbye
Proto file not loaded correctly or method name mismatch.
fix
Verify -I include path and full service/method name in -c flag.
Error: Failed to parse proto file: syntax error
Proto file has unsupported features or syntax errors.
fix
Ensure proto uses proto3 syntax and avoids features not supported by protobufjs (e.g., maps, oneof).
Upgrade
Version history
1.1.1latest on npm
Audit
Dependencies
@grpc/grpc-jsrequiredCore gRPC implementation for Node.js; requires dynamic loading of proto files.
yargsrequiredCLI argument parsing for commands and options.
Agent activity
8 hits · last 30 days
node
8
Resources
grpcnode — npm install grpcnode · libregistry