Registry / database / grpc-lite

grpc-lite

JSON →
library2016.12.3jsnpmunverified

grpc-lite is a zero-dependency package that downloads and installs a prebuilt gRPC binary (v1.0.1) from Google Cloud Storage. It was published in 2016 and targets Node.js v4–v6. The package is essentially a wrapper around the official gRPC Node.js package, providing a simplified installation by avoiding native compilation. However, it is severely outdated, relies on a specific prebuilt binary, and bundles a busybox binary for Linux. It does not support Node.js >=7 and is not actively maintained. For modern projects, use the official @grpc/grpc-js package.

npm install grpc-lite
INSTALL
IMPORT
SIG · GRPC-LITE
G
grpc-lite
databasejavascriptv2016.12.3
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.

grpc
const grpc = require('grpc-lite');
import grpc from 'grpc-lite';
This package is CommonJS only. It does not support ESM imports.
GrpcObject
Not applicable; package does not export types.
import { GrpcObject } from 'grpc-lite';
The package has no TypeScript definitions. Use @types/grpc for type support with the underlying grpc package.
load
const grpc = require('grpc-lite'); const proto = grpc.load('my.proto');
require('grpc-lite').load('my.proto');
The load method is available on the exported grpc object, but the API may differ from modern grpc packages.

Demonstrates loading a protobuf definition and making a unary gRPC call using the legacy grpc-lite API.

const grpc = require('grpc-lite'); const PROTO_PATH = __dirname + '/helloworld.proto'; const HelloRequest = grpc.load(PROTO_PATH).helloworld.HelloRequest; const client = new grpc.Client('localhost:50051', grpc.credentials.createInsecure()); const call = client.makeUnaryRequest('/helloworld.Greeter/SayHello', arg => arg.serializeBinary(), buf => HelloRequest.deserializeBinary(buf), new HelloRequest(), {}, (err, response) => { if (err) console.error(err); else console.log('Greeting:', response.getMessage()); });
Debug
Known issues
deprecatedThis package is no longer maintained and uses gRPC v1.0.1 from 2016.
fix
Use the official @grpc/grpc-js package for modern gRPC support.
affects: >=0
breakingDoes not support Node.js versions 7 and above.
fix
Use Node.js 6.x or lower, or migrate to @grpc/grpc-js.
affects: >=0
gotchaPackage downloads a prebuilt binary from a likely stale URL and includes a busybox binary.
fix
Do not use in production environments. It poses a security risk.
affects: >=0
Errors
Common errors & fixes
Error: Cannot find module 'grpc-lite'
The package is not installed or the npm registry package may be corrupted.
fix
Install the package: npm install grpc-lite@2016.12.3
grpc-lite: unsupported platform (win32 or node version >6)
The package only supports darwin/linux and Node.js v4–v6.
fix
Run on a supported platform or use @grpc/grpc-js instead.
Upgrade
Version history
2016.12.3latest on npm
Audit
Dependencies
grpcrequiredgrpc-lite is a wrapper that downloads and installs the grpc v1.0.1 prebuilt binary.
Agent activity
6 hits · last 30 days
node
6
Resources
grpc-lite — npm install grpc-lite · libregistry