Registry / devops / gcloud-pub-vue

gcloud-pub-vue

JSON →
library1.0.29jsnpmunverified

A Vue.js project template for integrating Google Cloud Pub/Sub with gRPC-web. Current version is 1.0.29, updated infrequently. It provides a scaffold for Vue CLI (v4+) projects to use grpc-web, google-protobuf, and Element-UI. Differentiates by offering a pre-configured setup for gRPC-web communication with Google Cloud Pub/Sub, simplifying the initial project creation and dependency management.

npm install gcloud-pub-vue
INSTALL
IMPORT
SIG · GCLOUD-PUB-VUE
G
gcloud-pub-vue
devopsjavascriptv1.0.29
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.

default (project template)
npm i -g @vue/cli && vue create gcloud-file-vue
npm i -g vue-cli (outdated CLI)
The package provides a template; imports vary per project. Above shows CLI usage for creating a project with this template.
grpc-web
import { GrpcWebClient } from 'grpc-web';
const grpc = require('grpc-web');
grpc-web is ESM-only, use named imports.
google-protobuf
import { Message } from 'google-protobuf';
const protobuf = require('google-protobuf');
google-protobuf supports ESM imports; named imports are idiomatic.

Steps to create a new Vue project with gcloud-pub-vue template, install gRPC-web, protobuf, and Element UI, then serve the project.

npm i -g @vue/cli vue create gcloud-file-vue npm i grpc-web npm i google-protobuf npm i element-ui # Then run: npm run serve
Debug
Known issues
deprecatedOlder Vue CLI (vue-cli) is deprecated. Use @vue/cli (version 4+).
fix
Uninstall vue-cli: npm uninstall -g vue-cli, then install @vue/cli: npm i -g @vue/cli
affects: >=1.0.0
breakinggrpc-web has breaking changes across major versions. Ensure compatibility with the project template's expected version.
fix
Specify exact version of grpc-web in package.json, e.g., "grpc-web": "1.2.1"
affects: >=1.0.0
gotchaUsing 'require' for grpc-web or google-protobuf will cause errors in Node.js or modern bundlers.
fix
Use ES module imports: import { ... } from 'grpc-web' and import { ... } from 'google-protobuf'
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'grpc-web'
grpc-web not installed or not in node_modules.
fix
Run 'npm install grpc-web' in your project directory.
This command requires @vue/cli version 4+
Using deprecated vue-cli instead of @vue/cli.
fix
Uninstall vue-cli and install @vue/cli: npm uninstall -g vue-cli && npm i -g @vue/cli
Upgrade
Version history
1.0.29latest on npm
Audit
Dependencies
@vue/clioptionalRequired for project scaffolding if using recommended setup
grpc-webrequiredCore dependency for gRPC-web communication
google-protobufrequiredProtobuf serialization/deserialization
element-uioptionalUI component library (optional, but listed in README)
Agent activity
2 hits · last 30 days
node
2
Resources
gcloud-pub-vue — npm install gcloud-pub-vue · libregistry