{"id":48090,"library":"grpc-vuex","title":"grpc-vuex","description":"A command-line code generator that produces JavaScript (Vuex) store modules and TypeScript definitions from gRPC-Web proto files. Stable version 0.21.0, low release cadence (last update 2020). Key differentiator: integrates gRPC-Web with Vuex state management, generating Vuex actions and mutations automatically. Requires external protoc and protoc-gen-grpc-web tools. Limited to unary RPCs; streaming not supported.","status":"maintenance","version":"0.21.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/honmaaax/grpc-vuex","tags":["javascript","grpc","grpc-web","proto","protobuf","protocolbuffers","vue","vuex"],"install":[{"cmd":"npm install grpc-vuex","lang":"bash","label":"npm"},{"cmd":"yarn add grpc-vuex","lang":"bash","label":"yarn"},{"cmd":"pnpm add grpc-vuex","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Protocol Buffers compiler, required at generation time","package":"protoc","optional":false},{"reason":"gRPC-Web code generator plugin, required at generation time","package":"protoc-gen-grpc-web","optional":false}],"imports":[{"note":"Generated functions are named exports, not default exports.","wrong":"import sayHello from './output'","symbol":"sayHello (generated function)","correct":"import { sayHello } from './output'"},{"note":"Interfaces are only available in .d.ts; import them as types.","wrong":"import { User } from './output'","symbol":"TypeScript interfaces (e.g., User, HelloRequest)","correct":"import type { User, HelloRequest } from './output'"},{"note":"Generated module uses named exports; destructuring required.","wrong":"const sayHello = require('./output')","symbol":"CommonJS require","correct":"const { sayHello } = require('./output')"}],"quickstart":{"code":"// Install globally\nnpm i -g grpc-vuex\n\n# Note: protoc and protoc-gen-grpc-web must be in PATH\n\n# Generate code from a proto file\n# grpc-vuex <output_file_path> <proto_file_paths ...>\ngrpc-vuex generated.js my-service.proto --endpoint https://api.example.com\n\n// In your Vuex store\nimport { sayHello } from './generated';\n\nsayHello({ users: [{ name: 'Alice', age: 30, children: ['Bob'] }] })\n  .then((res) => console.log(res))\n  .catch((err) => console.error(err));","lang":"typescript","description":"Shows global installation, code generation command, and usage of a generated unary RPC function in a Vuex context."},"warnings":[{"fix":"Install protoc from https://github.com/protocolbuffers/protobuf/releases and protoc-gen-grpc-web from https://github.com/grpc/grpc-web/releases.","message":"Requires protoc and protoc-gen-grpc-web to be installed and in PATH. Without them, generation fails silently.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use a different gRPC-Web client library if streaming is needed.","message":"No support for streaming RPCs (server-streaming, client-streaming, bidirectional). Only unary calls are generated.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Consider using @grpc/grpc-js or grpc-web directly with custom Vuex integration.","message":"Package last updated in 2020. May not work with newer versions of Vuex (3.x/4.x), protoc, or gRPC-Web.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use a bundler (Webpack, Rollup) or convert the generated file to ESM manually.","message":"The generated code uses CommonJS module format; ESM import requires a bundler or Node.js with ESM support.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Always include --endpoint with a valid URL.","message":"The --endpoint flag must be provided; otherwise, the generated code will have an undefined endpoint.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.21.0':27 '2020':33 'action':46 'automat':49 'cadenc':30 'code':8 'command':6 'command-lin':5 'definit':18 'differenti':35 'extern':51 'file':24 'gen':56 'generat':9,44 'grpc':2,21,38,57,68,70 'grpc-vuex':1 'grpc-web':20,37,69 'integr':36 'javascript':12,67 'key':34 'last':31 'limit':60 'line':7 'low':28 'manag':43 'modul':15 'mutat':48 'produc':11 'proto':23,72 'protobuf':73 'protoc':52,55 'protoc-gen-grpc-web':54 'protocolbuff':74 'releas':29 'requir':50 'rpcs':63 'stabl':25 'state':42 'store':14 'stream':64 'support':66 'tool':59 'typescript':17 'unari':62 'updat':32 'version':26 'vue':75 'vuex':3,13,41,45,76 'web':22,39,58,71","created_at":"2026-06-07T16:54:52.268999+00:00","updated_at":"2026-06-07T16:54:52.268999+00:00","problems":[{"fix":"Install via npm: npm install -g protoc-gen-grpc-web, or add its location to PATH.","cause":"protoc-gen-grpc-web is not installed or not in PATH.","error":"Error: Cannot find module 'protoc-gen-grpc-web'"},{"fix":"Install Protocol Buffers compiler (protoc) from https://github.com/protocolbuffers/protobuf/releases and ensure it is in PATH.","cause":"protoc is not installed or not in PATH.","error":"Error: Command failed: protoc --version"},{"fix":"Ensure the generated file is imported correctly after store creation, and that you are using Vuex 3.x (not 4.x).","cause":"The generated code expects a Vuex store instance, but none was provided or the import path is wrong.","error":"TypeError: Cannot read property 'prototype' of undefined"},{"fix":"grpc-vuex is a CLI code generator, not a runtime library. Run `npx grpc-vuex` to generate code, then import the generated file.","cause":"Trying to import grpc-vuex as a runtime library instead of using its CLI.","error":"TypeError: grpc_vuex is not a function"}],"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/honmaaax/grpc-vuex#readme","github":"ssh://git@github.com/honmaaax/grpc-vuex","docs":null,"changelog":null,"pypi":null,"npm":"grpc-vuex","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","communication"],"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}}