Distributes the Protocol Buffers compiler protoc and the Node.js gRPC plugin for generating client/server stubs. Current version 1.13.1. Released as part of grpc-node monorepo. Key differentiator: provides protoc binary and gRPC plugin in one npm package, eliminating need to install protoc separately. Supports generating code for grpc or @grpc/grpc-js, and package definition generation. Alternative to maintaining manual protoc installations.
npm install grpc-toolsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Run protoc with Node gRPC plugin to generate JS stubs from a .proto file, outputting in commonjs style and using @grpc/grpc-js.
Use require('grpc-tools').binaryPath to locate the binary.Run chmod +x on the binary path from binaryPath, or use node-pre-gyp to reinstall.
Use --grpc_out=grpc_js: instead of --grpc_out:
Use a separate protoc installation if targeting different platforms.
Reinstall the package: npm rebuild grpc-tools or remove node_modules and npm install.
Run: chmod +x $(node -e "console.log(require('grpc-tools').binaryPath)")Upgrade to version >=1.8.0: npm install grpc-tools@latest