Registry / devops / zv-grpc-web-build

zv-grpc-web-build

JSON →
library1.1.0jsnpmunverified

CLI protoc wrapper for generating TypeScript gRPC Web clients. Current stable version: 1.1.0. This tool recursively scans a source directory for .proto files and invokes protoc with the gRPC Web plugin to produce TypeScript and JavaScript client stubs. It simplifies integration into NPM build scripts, supports both grpcweb and grpcwebtext wire formats, and automatically adds /* eslint-disable */ annotations to generated JS files. Requires manual installation of protoc and protoc-gen-grpc-web binaries.

npm install zv-grpc-web-build
INSTALL
IMPORT
SIG · ZV-GRPC-WEB-BUILD
Z
zv-grpc-web-build
devopsjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Run the CLI tool to generate gRPC Web TypeScript clients from .proto files in ./protos, outputting to ./generated with text format (grpcwebtext).

npx zv-grpc-web-build -d ./protos -o ./generated -e .proto -b false
Debug
Known issues
gotchaThe protoc binary and protoc-gen-grpc-web plugin must be installed separately and available in PATH.
fix
Install protoc from https://grpc.io/docs/protoc-installation/ and protoc-gen-grpc-web from https://github.com/grpc/grpc-web#code-generator-plugin.
affects: >=1.0.0
gotchaThe tool may fail if source directory contains deeply nested proto files with import paths that are not correctly resolved.
fix
Ensure all proto imports are relative to a common root directory and pass that directory via -d.
affects: >=1.0.0
gotchaGenerated files have '/* eslint-disable */' prepended; linting rules may need adjustment for generated code.
fix
Add generated directories to .eslintignore or configure eslint to handle generated files.
affects: >=1.0.0
Errors
Common errors & fixes
Error: protoc not found
protoc binary not installed or not in PATH
fix
Install protoc compiler and ensure it's accessible via PATH.
Error: protoc-gen-grpc-web: program not found or is not executable
protoc-gen-grpc-web plugin not installed or not in PATH
fix
Install protoc-gen-grpc-web from https://github.com/grpc/grpc-web#code-generator-plugin.
Error: Cannot find module '...' from ...
Incorrect source directory or missing proto files
fix
Verify the source directory exists and contains .proto files.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
protocrequiredRequired protoc binary for compilation
protoc-gen-grpc-webrequiredRequired plugin for gRPC Web code generation
Agent activity
41 hits · last 30 days
node
36
Resources
zv-grpc-web-build — npm install zv-grpc-web-build · libregistry