Registry / testing / grpc-js-repository

grpc-js-repository

JSON →
library0.0.0-alpha1jsnpmunverified

grpc-js-repository is an open-source gRPC client library for Node.js, currently at version 0.0.0-alpha1 (pre-release). It provides a high-performance, easy-to-use API for building scalable network services. Key differentiators: focus on Node.js runtime, built-in error handling and retry mechanisms. Note: as an alpha release, it is not recommended for production use; consider @grpc/grpc-js for stable gRPC usage.

npm install grpc-js-repository
INSTALL
IMPORT
SIG · GRPC-JS-REPOSITORY
G
grpc-js-repository
testingjavascriptv0.0.0-alpha1
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.

GrpcClient
import { GrpcClient } from 'grpc-js-repository'
const GrpcClient = require('grpc-js-repository').GrpcClient
Package is ESM-only; use import syntax.
default
import grpc from 'grpc-js-repository'
const grpc = require('grpc-js-repository')
Default export may not exist; prefer named imports.
loadProto
import { loadProto } from 'grpc-js-repository'
const { loadProto } = require('grpc-js-repository')
Use ESM import.

Shows how to load a proto file and make an RPC call using the GrpcClient.

import { GrpcClient, loadProto } from 'grpc-js-repository'; import { join } from 'path'; const protoPath = join(process.cwd(), 'protos/helloworld.proto'); const packageDefinition = loadProto(protoPath); const client = new GrpcClient('localhost:50051', packageDefinition, { insecure: true, // for demo only }); const response = await client.sayHello({ name: 'World' }); console.log(response.message);
Debug
Known issues
breakingPackage is in alpha; API may change without notice.
fix
Pin to exact version and test frequently.
affects: >=0.0.0 <1.0.0
gotchaThe package does not use a stable gRPC core; may have compatibility issues.
fix
Consider using @grpc/grpc-js for production.
affects: >=0.0.0
deprecatedAlpha releases may be deprecated once stable release is out.
fix
Migrate to stable version when available.
affects: >=0.0.0 <1.0.0
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'grpc-js-repository'
Package not installed or typo in import.
fix
Run `npm install grpc-js-repository` and check import path.
TypeError: (0 , _grpcJsRepository.GrpcClient) is not a constructor
Incorrect import (CommonJS require)
fix
Use ES import syntax: `import { GrpcClient } from 'grpc-js-repository'`.
Error: Package subpath './package.json' is not defined
Using deep import without proper exports.
fix
Import only from root: `import { ... } from 'grpc-js-repository'`.
Upgrade
Version history
0.0.0-alpha1latest on npm
Audit
Dependencies
@grpc/proto-loaderrequiredRequired for loading .proto files
Agent activity
6 hits · last 30 days
node
6
Resources
grpc-js-repository — npm install grpc-js-repository · libregistry