{"id":49166,"library":"remotivelabs-grpc-web-stubs","title":"Remotive Labs gRPC Web Stubs","description":"Remotivelabs-grpc-web-stubs provides generated JavaScript/TypeScript gRPC-web stubs for RemotiveBroker, enabling browser-based gRPC calls via gRPC-web. Version 0.0.12 is current. Key differentiator: pre-generated stubs for RemotiveBroker API, eliminating manual protoc compilation. Uses @improbable-eng/grpc-web for transport. Minimal dependencies and ESM-first distribution.","status":"active","version":"0.0.12","language":"javascript","source_language":"en","source_url":"https://github.com/remotivelabs/remotivelabs-apis","tags":["javascript","typescript"],"install":[{"cmd":"npm install remotivelabs-grpc-web-stubs","lang":"bash","label":"npm"},{"cmd":"yarn add remotivelabs-grpc-web-stubs","lang":"bash","label":"yarn"},{"cmd":"pnpm add remotivelabs-grpc-web-stubs","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Protobuf runtime library required by generated stubs","package":"google-protobuf","optional":false},{"reason":"gRPC-web transport client for browser/Node.js","package":"@improbable-eng/grpc-web","optional":false},{"reason":"TypeScript type definitions for google-protobuf","package":"@types/google-protobuf","optional":true}],"imports":[{"note":"Package uses ESM; named export for the main client class.","wrong":"const GrpcWebStubs = require('remotivelabs-grpc-web-stubs');","symbol":"GrpcWebStubs","correct":"import { GrpcWebStubs } from 'remotivelabs-grpc-web-stubs'"},{"note":"Message types are in subpaths matching the proto file name (e.g., visibility_pb).","wrong":"import { Visibility } from 'remotivelabs-grpc-web-stubs'","symbol":"Visibility","correct":"import { Visibility } from 'remotivelabs-grpc-web-stubs/visibility_pb'"},{"note":"Service clients are exported from *_pb_service subpaths.","wrong":"import { VisibilityClient } from 'remotivelabs-grpc-web-stubs'","symbol":"VisibilityClient","correct":"import { VisibilityClient } from 'remotivelabs-grpc-web-stubs/visibility_pb_service'"}],"quickstart":{"code":"import { GrpcWebStubs } from 'remotivelabs-grpc-web-stubs';\nimport { Visibility } from 'remotivelabs-grpc-web-stubs/visibility_pb';\n\nconst client = new GrpcWebStubs({\n  baseUrl: process.env.REMOBROKER_URL ?? 'http://localhost:8080',\n  apiKey: process.env.REMOBROKER_API_KEY ?? '',\n});\n\nconst req = new Visibility();\nreq.setName('example');\nclient.getVisibility(req).then(res => {\n  console.log('Visibility:', res.toObject());\n}).catch(err => {\n  console.error('Error:', err);\n});","lang":"typescript","description":"Example of creating a GrpcWebStubs client, constructing a Visibility request, and making a gRPC-web call to RemotiveBroker."},"warnings":[{"fix":"Update to use `new GrpcWebStubs({ baseUrl, apiKey })` instead of `new GrpcWebStubs(baseUrl, apiKey)`.","message":"Version 0.0.12 introduced a breaking change in the client constructor signature to accept a single configuration object instead of multiple parameters.","severity":"breaking","affected_versions":">=0.0.12"},{"fix":"Pass baseUrl via the constructor configuration object.","message":"The `setBaseUrl()` method on client instances is deprecated and will be removed in a future release; use the constructor option instead.","severity":"deprecated","affected_versions":">=0.0.10"},{"fix":"Use named subpath imports: `import { Visibility } from 'remotivelabs-grpc-web-stubs/visibility_pb'`.","message":"Imports for message types (e.g., `Visibility`) must be from `*/visibility_pb` and not from the main package index.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Run `npm install google-protobuf @improbable-eng/grpc-web`.","message":"The package requires both `google-protobuf` and `@improbable-eng/grpc-web` as runtime dependencies; ensure they are installed.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Access response via `.response` property: `result.response.toObject()`.","message":"Promise-based method return values changed from raw gRPC response objects to wrapper objects containing `.response` in version 0.0.11.","severity":"deprecated","affected_versions":">=0.0.11"}],"env_vars":null,"search_vec":"'/grpc-web':51 '0.0.12':31 'api':42 'base':23 'browser':22 'browser-bas':21 'call':25 'compil':46 'current':33 'depend':55 'differenti':35 'distribut':60 'elimin':43 'enabl':20 'eng':50 'esm':58 'esm-first':57 'first':59 'generat':12,38 'grpc':3,8,15,24,28 'grpc-web':14,27 'improb':49 'improbable-eng':48 'javascript':61 'javascript/typescript':13 'key':34 'lab':2 'manual':44 'minim':54 'pre':37 'pre-gener':36 'protoc':45 'provid':11 'remot':1 'remotivebrok':19,41 'remotivelab':7 'remotivelabs-grpc-web-stub':6 'stub':5,10,17,39 'transport':53 'typescript':62 'use':47 'version':30 'via':26 'web':4,9,16,29","created_at":"2026-06-07T17:00:23.426492+00:00","updated_at":"2026-06-07T17:00:23.426492+00:00","problems":[{"fix":"Ensure package version >=0.0.12 and import path is correct. Also check if your bundler supports package.json exports field.","cause":"Subpath imports not enabled or package not resolved correctly","error":"Cannot find module 'remotivelabs-grpc-web-stubs/visibility_pb'"},{"fix":"Use `import { GrpcWebStubs } from 'remotivelabs-grpc-web-stubs'` (named import).","cause":"Using default import instead of named import","error":"TypeError: GrpcWebStubs is not a constructor"},{"fix":"Access `response.response.toObject()` if using version >=0.0.11.","cause":"Response object structure changed in v0.0.11; trying to call toObject on raw gRPC response instead of wrapper","error":"Error: Cannot read properties of undefined (reading 'toObject')"}],"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/remotivelabs/remotivelabs-apis#readme","github":"https://github.com/remotivelabs/remotivelabs-apis","docs":null,"changelog":null,"pypi":null,"npm":"remotivelabs-grpc-web-stubs","openapi_spec":null,"status_page":null,"smithery":null,"categories":["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}}