Registry / devops / protoc-tools-grpc-web-plugin

protoc-tools-grpc-web-plugin

JSON →
library1.3.2jsnpmunverified

A protoc-tools plugin that wraps protoc-gen-grpc-web binary for generating gRPC-Web client code. Current stable version 1.3.2 (npm). Plugin is actively maintained, releases follow protoc-gen-grpc-web updates. Key differentiators: automatic binary download/versioning via npm install, environment variable overrides, seamless integration with @accility/protoc-tools workflow. Ships TypeScript types, requires Node >=14.

npm install protoc-tools-grpc-web-plugin
INSTALL
IMPORT
SIG · PROTOC-TOOLS-GRPC-
P
protoc-tools-grpc-web-plugin
devopsjavascriptv1.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

grpcweb
import * as grpcweb from 'protoc-tools-grpc-web-plugin'
const grpcweb = require('protoc-tools-grpc-web-plugin')
ESM-only; package does not export a default, use namespace import.

Configures protoc-tools with gRPC-Web plugin to generate CommonJS JavaScript stubs and gRPC-Web text mode client code.

import * as tools from '@accility/protoc-tools' import * as grpcweb from 'protoc-tools-grpc-web-plugin' tools.protoc({ protoDir: './proto', outDir: './generated', protoFiles: ['./proto/hello.proto'], outOptions: [ tools.generators.js({ outOptions: 'import_style=commonjs' }), grpcweb({ module: 'commonjs', mode: 'grpcwebtext' }) ] })
Debug
Known issues
gotchaBinary version defaults to 'latest' if not explicitly set. Use package.json config or env var to pin a specific version to avoid unexpected breaking changes.
fix
Set 'config.protoc-gen-grpc-web-version' in package.json or set 'PROTOC_GEN_GRPC_WEB_VERSION' environment variable.
affects: >=0.0.0
gotchaEnvironment variable PROTOC_GEN_GRPC_WEB_VERSION overrides package.json config; if set inadvertently, wrong binary version may be downloaded.
fix
Unset PROTOC_GEN_GRPC_WEB_VERSION or explicitly set to desired version.
affects: >=0.0.0
deprecatedPackage is ESM-only since v1.0; CommonJS require() will not work.
fix
Use ESM import syntax (import * as grpcweb from 'protoc-tools-grpc-web-plugin').
affects: >=1.0.0
gotchaThe 'next' binary version tag may be unstable; using it in production can lead to runtime failures.
fix
Only use 'next' as a temporary version for testing; pin to a stable version for production.
affects: >=0.0.0
gotchaAfter changing the binary version in package.json, npm ci is required to trigger reinstallation of the binary; npm install may not reinstall if binary is already cached.
fix
Run 'npm ci' instead of 'npm install' after changing binary version.
affects: >=0.0.0
gotchaThe plugin downloads binary during postinstall; firewalls or proxy restrictions may cause silent failure or broken installation.
fix
Set environment variable PROTOC_TOOLS_GRPC_WEB_PLUGIN_NO_INSTALL=1 to skip download, then manually place the binary.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'protoc-tools-grpc-web-plugin'
Package not installed or not in node_modules.
fix
Run 'npm install protoc-tools-grpc-web-plugin --save-dev'.
TypeError: grpcweb is not a function
Default import used instead of namespace import.
fix
Use 'import * as grpcweb from 'protoc-tools-grpc-web-plugin'' instead of 'import grpcweb from ...'.
Error: binary not found for version latest
GitHub release download failed or binary version does not exist.
fix
Pin a known valid version in package.json config or env var and retry.
Upgrade
Version history
1.3.2latest on npm
Audit
Dependencies
@accility/protoc-toolsrequiredRequired peer dependency; plugin is designed to work with protoc-tools
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
protoc-tools-grpc-web-plugin — npm install protoc-tools-grpc-web-plugin · libregistry