Registry / storage / verdaccio-google-cloud

verdaccio-google-cloud

JSON →
library11.1.3jsnpmunverified

Verdaccio Google Cloud plugin provides Google Cloud Storage (bucket) for package storage and optional Datastore for metadata. Currently at version 11.1.3, it requires Node >=24 and is updated in sync with major Verdaccio releases. Key differentiators: fully managed, scalable cloud storage; supports GCP IAM; integrates with Verdaccio's plugin system (auth, storage, middleware). Stable release cadence follows Verdaccio major versions. Essential for deploying Verdaccio on Google Cloud with persistent, geo-replicated storage.

npm install verdaccio-google-cloud
INSTALL
IMPORT
SIG · VERDACCIO-GOOGLE-C
V
verdaccio-google-cloud
storagejavascriptv11.1.3
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 (plugin function)
import googleCloudPlugin from 'verdaccio-google-cloud'
const googleCloudPlugin = require('verdaccio-google-cloud')
ESM-only since v11; previous CJS usage is broken.
GoogleCloudStorage
import { GoogleCloudStorage } from 'verdaccio-google-cloud/storage'
import { GoogleCloudStorage } from 'verdaccio-google-cloud'
Storage class is exported from subpath; using main entry exports a function, not class.
GoogleCloudDatastore
import { GoogleCloudDatastore } from 'verdaccio-google-cloud/datastore'
Only export if Datastore dependency installed; otherwise import fails.

Shows importing the plugin function and storage class, and constructing a GoogleCloudStorage instance with environment-based configuration.

// Configure in config.yaml: // store: // package: verdaccio-google-cloud // storage: package // options: // bucket: my-verdaccio-bucket // projectId: my-gcp-project // keyFilename: /path/to/service-account-key.json // Use default import to get plugin function: import googleCloudPlugin from 'verdaccio-google-cloud'; // Access storage class directly: import { GoogleCloudStorage } from 'verdaccio-google-cloud/storage'; const storage = new GoogleCloudStorage({ config: { bucket: process.env.GCS_BUCKET ?? 'default-bucket', projectId: process.env.GCP_PROJECT ?? 'my-project', keyFilename: process.env.GOOGLE_APPLICATION_CREDENTIALS ?? '' }, logger: console }); await storage.init(); // Now storage instance is ready for Verdaccio operations.
Debug
Known issues
breakingv11 drops CommonJS support; only ESM imports work.
fix
Use import syntax; if using CommonJS, upgrade to Node >=24 and use dynamic import().
affects: >=11.0.0
breakingRequires Node >=24 as of v11. Older Node versions not supported.
fix
Upgrade Node to v24 or later.
affects: >=11.0.0
gotchaThe main export is a function, not a class; for class import use subpaths.
fix
Use 'import { GoogleCloudStorage } from 'verdaccio-google-cloud/storage'' instead of main entry.
affects: >=11.0.0
deprecatedv10.x used CJS; v11 is ESM-only, breaking all require() calls.
fix
Update imports to ESM syntax (import/export).
affects: <11.0.0
gotchaDatastore subpath import fails if @google-cloud/datastore not installed.
fix
Install @google-cloud/datastore as a dependency, or avoid importing that path.
affects: >=11.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported.
Using require() on v11 which is ESM-only.
fix
Replace require with import or use dynamic import().
TypeError: googleCloudPlugin is not a constructor
Trying to use the default import as a class with 'new googleCloudPlugin()'.
fix
The default export is a function; call it directly (googleCloudPlugin(config)) or use subpath imports for classes.
Cannot find module 'verdaccio-google-cloud/datastore'
Trying to import subpath without having @google-cloud/datastore installed.
fix
Install @google-cloud/datastore or remove the import.
Upgrade
Version history
11.1.3latest on npm
Audit
Dependencies
verdacciorequiredPeer dependency; plugin runtime requires Verdaccio installed
@google-cloud/storagerequiredGoogle Cloud Storage client library for bucket operations
@google-cloud/datastoreoptionalOptional for using Datastore-based metadata storage
Agent activity
45 hits · last 30 days
node
38
OpenAI (training)
1
Resources
verdaccio-google-cloud — npm install verdaccio-google-cloud · libregistry