Registry / devops / quick-grpc

quick-grpc

JSON →
library2.0.0jsnpmunverified

quick-grpc is a Node.js library (v2.0.0) that simplifies loading and instantiating gRPC services from .proto files. It wraps the official @grpc/grpc-js package to provide a Promise-based API, automatic TLS credential loading, and camelCase method name conversion. Released with moderate frequency, it targets Node.js >=12 and reduces boilerplate for setting up gRPC clients. Unlike raw gRPC, it handles multiple proto files in a directory and returns pre-configured service objects.

npm install quick-grpc
INSTALL
IMPORT
SIG · QUICK-GRPC
Q
quick-grpc
devopsjavascriptv2.0.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.

QuickgRpc
const QuickgRpc = require('quick-grpc')
import QuickgRpc from 'quick-grpc'
Package is CommonJS-only; no default ESM export.
QuickgRpc
import QuickgRpc from 'quick-grpc'
const { QuickgRpc } = require('quick-grpc')
Named import not supported; only default export.
QuickgRpc
const QuickgRpc = require('quick-grpc')
const QuickgRpc = require('quick-grpc').default
No default property export.

Show how to instantiate quick-grpc with TLS credentials and a proto directory, then log the resulting service objects.

const QuickgRpc = require('quick-grpc'); const { readFileSync } = require('fs'); async function main() { const myLibrary = await new QuickgRpc({ host: 'localhost:443', credentials: { root: readFileSync('ca-cert.pem'), priv: readFileSync('example.key'), chain: readFileSync('example.cert') }, basePath: './protosDirectory', camelCaseMethods: true }); console.log('myLibrary:', myLibrary); } main().catch(console.error);
Debug
Known issues
gotchaPackage uses CommonJS; no ESM support.
fix
Use require() instead of import.
affects: >=2.0.0
gotchaThe constructor returns a Promise; forgetting await leads to undefined.
fix
Always use await when instantiating new QuickgRpc().
affects: >=2.0.0
deprecatedThe 'credentials' option keys may change in future; current keys are 'root', 'priv', 'chain'.
fix
Check documentation for updates; consider using grpc.credentials directly.
affects: 2.0.0
gotchaIf no credentials are provided, default is grpc.credentials.createInsecure().
fix
Explicitly set credentials if secure connection is required.
affects: >=2.0.0
breakingV2.0.0 changed from callback-based to Promise-based API.
fix
Use async/await or .then() instead of callbacks.
affects: 2.0.0
Errors
Common errors & fixes
TypeError: QuickgRpc is not a constructor
ESM import used incorrectly; package is CommonJS-only.
fix
Use const QuickgRpc = require('quick-grpc')
Error: Cannot find module 'protobufjs'
Missing peer dependency protobufjs.
fix
Run npm install protobufjs
Error: ENOENT: no such file or directory, open 'protosDirectory/...'
basePath points to non-existent directory.
fix
Ensure basePath is correct and contains .proto files.
Error: The gRPC binary module is not installed
Missing node-pre-gyp related dep; likely @grpc/grpc-js not built.
fix
Rebuild: npm rebuild @grpc/grpc-js
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
@grpc/grpc-jsrequiredCore gRPC implementation for Node.js
protobufjsrequiredUsed internally for parsing .proto files
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
quick-grpc — npm install quick-grpc · libregistry