{"id":48043,"library":"grpc-kit","title":"grpc-kit","description":"grpc-kit is a Node.js library (v0.2.0, no recent updates) that simplifies working with gRPC by providing a higher-level API for creating servers and clients from .proto files. It wraps the official `grpc` and `@grpc/proto-loader` packages, offering a declarative route definition style with support for unary, client, server, and bidirectional streaming. Notable features include async route handlers and built-in proto loader options. The library is minimal but currently unmaintained; users should consider modern alternatives like `@grpc/grpc-js` with manual proto loading for active support.","status":"deprecated","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/YoshiyukiKato/grpc-kit","tags":["javascript","grpc"],"install":[{"cmd":"npm install grpc-kit","lang":"bash","label":"npm"},{"cmd":"yarn add grpc-kit","lang":"bash","label":"yarn"},{"cmd":"pnpm add grpc-kit","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: provides the core gRPC implementation. grpc-kit wraps this to simplify server/client creation.","package":"grpc","optional":false},{"reason":"Peer dependency: loads .proto files and generates service definitions. grpc-kit uses it internally.","package":"@grpc/proto-loader","optional":false}],"imports":[{"note":"CommonJS require is required; ESM import will fail.","wrong":"import { createServer } from 'grpc-kit'; // Not valid ESM; library is CommonJS only.","symbol":"createServer","correct":"const { createServer } = require('grpc-kit')"},{"note":"CommonJS require is required; ESM import will fail.","wrong":"import { createClient } from 'grpc-kit'; // Not valid ESM; library is CommonJS only.","symbol":"createClient","correct":"const { createClient } = require('grpc-kit')"},{"note":"No default export; use destructuring or require.","wrong":"import grpcKit from 'grpc-kit'; // Not valid ESM; library is CommonJS only.","symbol":"default import","correct":"const grpcKit = require('grpc-kit')"}],"quickstart":{"code":"const { createServer, createClient } = require('grpc-kit');\n\n// Server\nconst server = createServer();\nserver.use({\n  protoPath: '/path/to/greeter.proto',\n  packageName: 'greeter',\n  serviceName: 'Greeter',\n  routes: {\n    hello: (call, callback) => {\n      callback(null, { message: `Hello, ${call.request.name}` });\n    },\n    goodbye: async (call) => {\n      return { message: `Goodbye, ${call.request.name}` };\n    }\n  },\n  options: { keepCase: true, longs: String, enums: String, defaults: true, oneofs: true }\n});\nserver.listen('0.0.0.0:50051');\n\n// Client\nconst client = createClient({\n  protoPath: '/path/to/greeter.proto',\n  packageName: 'greeter',\n  serviceName: 'Greeter',\n  options: { keepCase: true, longs: String, enums: String, defaults: true, oneofs: true }\n}, '0.0.0.0:50051');\n\nclient.hello({ name: 'Alice' }, (err, response) => {\n  if (err) throw err;\n  console.log(response.message);\n});","lang":"javascript","description":"Creates a gRPC server and client for a simple greeter service using grpc-kit."},"warnings":[{"fix":"Migrate to `@grpc/grpc-js` directly and handle proto loading manually or use a maintained wrapper like `grpc-reflection`.","message":"grpc-kit is no longer maintained. The underlying `grpc` package is deprecated in favor of `@grpc/grpc-js`. Use at your own risk.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Replace `grpc` with `@grpc/grpc-js` in your project, but note that grpc-kit does not support `@grpc/grpc-js` directly.","message":"The `grpc` package (peer dep) is deprecated and native bindings may fail on newer Node.js versions. `@grpc/grpc-js` is the pure JavaScript successor.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"Use `require('grpc-kit')` or configure your bundler to handle CommonJS.","message":"Library is CommonJS only. Attempting to use ESM `import` syntax will result in a runtime error.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Always call `call.end()` after writing all responses in server streaming handlers.","message":"Route handlers for server streaming must call `call.end()` explicitly; otherwise, the client stream may hang.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'activ':90 'altern':82 'api':26 'async':61 'bidirect':56 'built':66 'built-in':65 'client':31,53 'consid':80 'creat':28 'current':76 'declar':45 'definit':47 'featur':59 'file':34 'grpc':2,5,19,39,93 'grpc-kit':1,4 'grpc/grpc-js':84 'grpc/proto-loader':41 'handler':63 'higher':24 'higher-level':23 'includ':60 'javascript':92 'kit':3,6 'level':25 'librari':10,72 'like':83 'load':88 'loader':69 'manual':86 'minim':74 'modern':81 'node.js':9 'notabl':58 'offer':43 'offici':38 'option':70 'packag':42 'proto':33,68,87 'provid':21 'recent':13 'rout':46,62 'server':29,54 'simplifi':16 'stream':57 'style':48 'support':50,91 'unari':52 'unmaintain':77 'updat':14 'user':78 'v0.2.0':11 'work':17 'wrap':36","created_at":"2026-06-07T16:54:37.966544+00:00","updated_at":"2026-06-07T16:54:37.966544+00:00","problems":[{"fix":"Run: npm install grpc @grpc/proto-loader grpc-kit","cause":"Package not installed or missing peer dependencies.","error":"Error: Cannot find module 'grpc-kit'"},{"fix":"Use an older version of `grpc` (e.g., 1.24.x) or migrate away from grpc-kit.","cause":"Grpc-kit internally calls `grpc.load` which is deprecated in newer `grpc` versions.","error":"TypeError: grpc.load is not a function","affected_versions":">=0.2.0"},{"fix":"Ensure routes object keys match the exact RPC names (e.g., 'hello' not 'Hello').","cause":"Route names must match exactly the RPC method name in the proto file (case-sensitive).","error":"Error: The method 'hello' is not supported by the service"},{"fix":"Verify server address and port. Ensure server is listening before client connects.","cause":"Server not reachable or wrong address.","error":"Unhandled stream error: Error: 14 UNAVAILABLE: Connection dropped"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/YoshiyukiKato/grpc-kit#readme","github":"https://github.com/YoshiyukiKato/grpc-kit","docs":null,"changelog":null,"pypi":null,"npm":"grpc-kit","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}