{"id":48060,"library":"grpc-plugins","title":"gRPC Plugins","description":"Provides OSX binaries for common gRPC protoc compiler plugins needed to generate gRPC client/server code for Node.js (JavaScript/TypeScript), Swift, Java (Android) and Java lite. Current version 0.0.4 includes protoc v3.6.0, grpc_node_plugin v1.6.6, protoc-gen-grpc-java v1.13.1, protoc-gen-swiftgrpc v0.4.3, and protoc-gen-ts. Only OSX binaries are available; contributions for Linux/Windows are welcome. This package simplifies setup by bundling all plugins in one dependency, but note the binaries are outdated and the package has not been updated since 2018.","status":"deprecated","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/anjmao/grpc-plugins","tags":["javascript","gRPC","React","Native","Swift","Android","iOS"],"install":[{"cmd":"npm install grpc-plugins","lang":"bash","label":"npm"},{"cmd":"yarn add grpc-plugins","lang":"bash","label":"yarn"},{"cmd":"pnpm add grpc-plugins","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required at runtime for Node.js gRPC client/server. The generated code uses '@grpc/grpc-js' recommended instead.","package":"grpc","optional":false},{"reason":"Alternative source for grpc_node_plugin; this package bundles the same binary.","package":"grpc-tools","optional":true},{"reason":"The protoc compiler required to run the plugins. Bundled here for OSX.","package":"protoc","optional":true}],"imports":[{"note":"Use path module for cross-platform compatibility. The binaries are only available for OSX.","wrong":"const BINPATH = './node_modules/grpc-plugins/osx'","symbol":"path","correct":"const BINPATH = path.join(__dirname, 'node_modules', 'grpc-plugins', 'osx')"},{"note":"'grpc' package is deprecated; use '@grpc/grpc-js' for Node.js gRPC implementation.","wrong":"const grpc = require('grpc')","symbol":"require","correct":"const grpc = require('@grpc/grpc-js')"},{"note":"Use '@grpc/proto-loader' to load .proto files dynamically at runtime.","wrong":"const protoLoader = require('grpc-tools')","symbol":"proto-loader","correct":"const protoLoader = require('@grpc/proto-loader')"}],"quickstart":{"code":"// Install: yarn add --dev grpc-plugins\n// Then use the shell script from the README to generate code.\n// Note: Only works on OSX. Binaries are outdated.\n\nconst path = require('path');\nconst { execSync } = require('child_process');\n\nconst binPath = path.resolve('node_modules/grpc-plugins/osx');\nconst protoDir = path.resolve('proto');\nconst outDir = path.resolve('generated');\n\n// Generate Node.js code\nexecSync(`${binPath}/protoc \\\n  --js_out=import_style=commonjs,binary:${outDir} \\\n  --grpc_out=${outDir} \\\n  --plugin=protoc-gen-grpc=${binPath}/grpc_node_plugin \\\n  -I ${protoDir} \\\n  ${protoDir}/*.proto`, { stdio: 'inherit' });","lang":"javascript","description":"Demonstrates running protoc with grpc_node_plugin to generate gRPC stubs for Node.js."},"warnings":[{"fix":"Use latest versions from official sources: https://github.com/protocolbuffers/protobuf/releases, https://www.npmjs.com/package/grpc-tools","message":"Package not maintained since 2018. Binaries for protoc, grpc_node_plugin, and others are outdated.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Install native binaries for your platform manually or use package like 'protoc' and 'grpc-tools'.","message":"Only OSX binaries provided. Using on Linux or Windows will fail with missing binaries.","severity":"gotcha","affected_versions":"<=0.0.4"},{"fix":"Use '@grpc/grpc-js' package and update generated code accordingly.","message":"The 'grpc' npm package is deprecated. Generated code expects 'grpc' but '@grpc/grpc-js' is recommended.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Download latest protoc from https://github.com/protocolbuffers/protobuf/releases","message":"Version 0.0.4 bundles protoc v3.6.0, which may not be compatible with newer .proto syntax or options.","severity":"breaking","affected_versions":"0.0.4"},{"fix":"Verify binary file exists in node_modules/grpc-plugins/osx after install.","message":"The package includes binaries as git-lfs or platform-specific files; ensure they are correctly downloaded on install.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'0.0.4':29 '2018':88 'android':23,94 'avail':57 'binari':5,55,77 'bundl':68 'client/server':16 'code':17 'common':7 'compil':10 'contribut':58 'current':27 'depend':73 'gen':39,45,51 'generat':14 'grpc':1,8,15,33,40,90 'includ':30 'io':95 'java':22,25,41 'javascript':89 'javascript/typescript':20 'linux/windows':60 'lite':26 'nativ':92 'need':12 'node':34 'node.js':19 'note':75 'one':72 'osx':4,54 'outdat':79 'packag':64,82 'plugin':2,11,35,70 'protoc':9,31,38,44,50 'protoc-gen-grpc-java':37 'protoc-gen-swiftgrpc':43 'protoc-gen-t':49 'provid':3 'react':91 'setup':66 'simplifi':65 'sinc':87 'swift':21,93 'swiftgrpc':46 'ts':52 'updat':86 'v0.4.3':47 'v1.13.1':42 'v1.6.6':36 'v3.6.0':32 'version':28 'welcom':62","created_at":"2026-06-07T16:54:43.429943+00:00","updated_at":"2026-06-07T16:54:43.429943+00:00","problems":[{"fix":"npm install @grpc/grpc-js and replace imports from 'grpc' to '@grpc/grpc-js'","cause":"Generated code imports 'grpc' package which is not installed or is deprecated.","error":"Error: Cannot find module 'grpc'"},{"fix":"Use native Linux binaries; this package only supports OSX.","cause":"Missing protobuf runtime libraries on Linux when using OSX binary via Wine or similar.","error":"protoc: error while loading shared libraries: libprotoc.so.xx: cannot open shared object file"},{"fix":"Check that binPath is correct and run chmod +x on the plugin file.","cause":"Binary not executable or not found in PATH.","error":"grpc_node_plugin: command not found"}],"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/anjmao/grpc-plugins#readme","github":"https://github.com/anjmao/grpc-plugins","docs":null,"changelog":null,"pypi":null,"npm":"grpc-plugins","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}}