{"id":48807,"library":"nx-grpc-ts","title":"nx-grpc-ts","description":"nx-grpc-ts (npm package @lazurdit/nx-grpc) is a TypeScript library that generates gRPC client and server code from Protocol Buffer definitions for use with Nx workspaces. Current stable version is 0.1.196, updated frequently. It aims to simplify integrating gRPC into Nx monorepos by providing code generation and runtime helper utilities. In early development, with potential breaking changes. Not production-ready.","status":"active","version":"0.1.196","language":"javascript","source_language":"en","source_url":"https://github.com/lazurdit/nx-grpc-npm","tags":["javascript","typescript"],"install":[{"cmd":"npm install nx-grpc-ts","lang":"bash","label":"npm"},{"cmd":"yarn add nx-grpc-ts","lang":"bash","label":"yarn"},{"cmd":"pnpm add nx-grpc-ts","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required gRPC client/server runtime","package":"@grpc/grpc-js","optional":false},{"reason":"Protocol Buffer message encoding/decoding","package":"protobufjs","optional":false}],"imports":[{"note":"Package is published as @lazurdit/nx-grpc, not nx-grpc-ts.","wrong":"import { NxGrpcClient } from 'nx-grpc-ts'","symbol":"NxGrpcClient","correct":"import { NxGrpcClient } from '@lazurdit/nx-grpc'"},{"note":"ESM-only package; require() will fail unless using Node with ESM.","wrong":"const NxGrpcServer = require('@lazurdit/nx-grpc').NxGrpcServer","symbol":"NxGrpcServer","correct":"import { NxGrpcServer } from '@lazurdit/nx-grpc'"},{"note":"This is the main loader function for .proto files.","symbol":"loadProto","correct":"import { loadProto } from '@lazurdit/nx-grpc'"}],"quickstart":{"code":"import { NxGrpcServer, NxGrpcClient, loadProto } from '@lazurdit/nx-grpc';\n\n// Load a proto file\nconst protoDef = loadProto('path/to/service.proto');\n\n// Create server\nconst server = new NxGrpcServer({ proto: protoDef, address: '0.0.0.0:50051' });\nserver.start();\n\n// Create client\nconst client = new NxGrpcClient({ proto: protoDef, address: 'localhost:50051' });\nconst response = await client.call('MyMethod', { requestField: 'value' });\nconsole.log(response);\n\n// Graceful shutdown\nprocess.on('SIGINT', () => {\n  server.stop();\n  client.close();\n});","lang":"typescript","description":"Demonstrates loading a .proto file, starting a gRPC server, and making a client call."},"warnings":[{"fix":"Pin exact version in package.json and test upgrades carefully.","message":"Package is in early development (v0.x). API and behavior may change without major version bump.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Install using 'npm install @lazurdit/nx-grpc'.","message":"The npm package name is @lazurdit/nx-grpc, not nx-grpc-ts.","severity":"gotcha","affected_versions":"*"},{"fix":"Use ES import syntax or set type to module in package.json.","message":"ESM-only package. CommonJS require() will not work in Node < 16 or without \"type\": \"module\".","severity":"gotcha","affected_versions":"*"},{"fix":"Run 'npm install @grpc/grpc-js protobufjs'.","message":"Dependencies @grpc/grpc-js and protobufjs must be installed explicitly.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'0.1.196':36 'aim':40 'break':61 'buffer':25 'chang':62 'client':19 'code':22,50 'current':32 'definit':26 'develop':58 'earli':57 'frequent':38 'generat':17,51 'grpc':3,7,18,44 'helper':54 'integr':43 'javascript':67 'lazurdit/nx-grpc':11 'librari':15 'monorepo':47 'npm':9 'nx':2,6,30,46 'nx-grpc-ts':1,5 'packag':10 'potenti':60 'product':65 'production-readi':64 'protocol':24 'provid':49 'readi':66 'runtim':53 'server':21 'simplifi':42 'stabl':33 'ts':4,8 'typescript':14,68 'updat':37 'use':28 'util':55 'version':34 'workspac':31","created_at":"2026-06-07T16:58:34.116255+00:00","updated_at":"2026-06-07T16:58:34.116255+00:00","problems":[{"fix":"Install correct package: npm install @lazurdit/nx-grpc","cause":"Incorrect package name in import or missing installation.","error":"Cannot find module '@lazurdit/nx-grpc'"},{"fix":"Use ES import: import { NxGrpcServer } from '@lazurdit/nx-grpc'","cause":"Using CommonJS require() on ESM-only package.","error":"TypeError: NxGrpcServer is not a constructor"},{"fix":"npm install @grpc/grpc-js","cause":"Missing peer dependency.","error":"Error: Cannot find module '@grpc/grpc-js'"}],"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/lazurdit/nx-grpc-npm#readme","github":"https://github.com/lazurdit/nx-grpc-npm","docs":null,"changelog":null,"pypi":null,"npm":"nx-grpc-ts","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}}