{"id":48081,"library":"grpc-ts-health-check","title":"grpc-ts-health-check","description":"Implementation of gRPC health checking protocol in TypeScript, version 3.1.3. Provides client and server health check services compatible with @grpc/grpc-js. Requires @grpc/grpc-js >=1.8.14 and @grpc/proto-loader >=0.7.7 as peer dependencies. Generates TypeScript types from .proto files. Key differentiator: full TypeScript support with type safety for health check requests and responses, enabling easy integration into gRPC microservices.","status":"active","version":"3.1.3","language":"javascript","source_language":"en","source_url":"https://github.com/nicolaspearson/kalos","tags":["javascript","grpc","health","check","health-check","typescript"],"install":[{"cmd":"npm install grpc-ts-health-check","lang":"bash","label":"npm"},{"cmd":"yarn add grpc-ts-health-check","lang":"bash","label":"yarn"},{"cmd":"pnpm add grpc-ts-health-check","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: gRPC core library","package":"@grpc/grpc-js","optional":false},{"reason":"Peer dependency: loads gRPC proto files","package":"@grpc/proto-loader","optional":false},{"reason":"Runtime dependency: Protocol Buffers data format","package":"google-protobuf","optional":false},{"reason":"Runtime dependency: creates gRPC-friendly errors","package":"grpc-boom","optional":false}],"imports":[{"note":"Default export does not exist; use named import for HealthClient.","wrong":"import HealthClient from 'grpc-ts-health-check'","symbol":"HealthClient","correct":"import { HealthClient } from 'grpc-ts-health-check'"},{"note":"Also available for implementing server-side health checks.","wrong":"","symbol":"HealthServer","correct":"import { HealthServer } from 'grpc-ts-health-check'"},{"note":"ServiceError is part of @grpc/grpc-js, not grpc-ts-health-check.","wrong":"import { ServiceError } from 'grpc-ts-health-check'","symbol":"ServiceError","correct":"import { ServiceError } from '@grpc/grpc-js'"}],"quickstart":{"code":"import * as grpc from '@grpc/grpc-js';\nimport * as protoLoader from '@grpc/proto-loader';\nimport { HealthClient } from 'grpc-ts-health-check';\nimport { ProtoGrpcType } from './path/to/generated/health';\n\nconst packageDefinition = protoLoader.loadSync('./health.proto', {\n  keepCase: true,\n  longs: String,\n  enums: String,\n  defaults: true,\n  oneofs: true,\n});\nconst proto = grpc.loadPackageDefinition(packageDefinition) as unknown as ProtoGrpcType;\n\nconst client = new HealthClient('localhost:50051', grpc.ChannelCredentials.createInsecure());\n\nclient.check({ service: 'myService' }, (error, response) => {\n  if (error) {\n    console.error(error);\n  } else {\n    console.log('Status:', response?.status);\n  }\n});","lang":"typescript","description":"Initializes a gRPC health check client, loads proto definition, and makes a check request."},"warnings":[{"fix":"Update @grpc/grpc-js to >=1.8.14 and @grpc/proto-loader to >=0.7.7.","message":"Version 3.0.0 dropped support for @grpc/grpc-js versions below 1.8.14. Upgrade peer dependency.","severity":"breaking","affected_versions":"<3.0.0"},{"fix":"Pass grpc.ChannelCredentials.createSsl() or other secure credentials instead of createInsecure().","message":"The old HealthClient constructor with insecure credentials is deprecated. Use secure credentials in production.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Generate TypeScript types from health.proto using protoc and the ts-proto plugin, then import generated types.","message":"Importing 'grpc-ts-health-check' without generating proto types fails. The package does not include pre-compiled .proto definitions.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use grpc.ClientReadableStream<HealthCheckResponse> from @grpc/grpc-js.","message":"The 'watch' method returns a ClientReadableStream but the type may not be exported. You may need to manually cast.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Manually create ServiceError objects instead of using grpc-boom.","message":"The 'grpc-boom' dependency is deprecated and may cause security vulnerabilities. Consider migrating to @grpc/grpc-js error handling.","severity":"deprecated","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'0.7.7':31 '1.8.14':28 '3.1.3':15 'check':5,10,21,51,64,67 'client':17 'compat':23 'depend':34 'differenti':42 'easi':56 'enabl':55 'file':40 'full':43 'generat':35 'grpc':2,8,59,62 'grpc-ts-health-check':1 'grpc/grpc-js':25,27 'grpc/proto-loader':30 'health':4,9,20,50,63,66 'health-check':65 'implement':6 'integr':57 'javascript':61 'key':41 'microservic':60 'peer':33 'proto':39 'protocol':11 'provid':16 'request':52 'requir':26 'respons':54 'safeti':48 'server':19 'servic':22 'support':45 'ts':3 'type':37,47 'typescript':13,36,44,68 'version':14","created_at":"2026-06-07T16:54:49.632335+00:00","updated_at":"2026-06-07T16:54:49.632335+00:00","problems":[{"fix":"Upgrade @grpc/grpc-js to >=1.8.14 and @grpc/proto-loader to >=0.7.7.","cause":"Using an incompatible version of @grpc/grpc-js (likely <1.8.14).","error":"TypeError: grpc.loadPackageDefinition is not a function"},{"fix":"Run 'npm install grpc-ts-health-check' and ensure import path is correct.","cause":"Package not installed or typo in import path.","error":"Error: Cannot find module 'grpc-ts-health-check'"},{"fix":"Generate types from health.proto using ts-proto and import them, or cast to any.","cause":"Missing proto type generation or incorrect type definition reference.","error":"Property 'check' does not exist on type 'HealthClient'"}],"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/nicolaspearson/kalos#readme","github":"https://github.com/nicolaspearson/kalos","docs":null,"changelog":null,"pypi":null,"npm":"grpc-ts-health-check","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}}