Registry / devops / nx-remotecache-gcs

nx-remotecache-gcs

JSON →
library2.2.0jsnpmunverified

Nx-remotecache-gcs v2.2.0 is a task runner for Nx that uses a Google Cloud Storage (GCS) bucket as a remote cache, enabling shared cache between team members and CI servers. It requires @nx/workspace >=16.0.0 and is configured via nx.json. Compared to other remote cache solutions (e.g., nx-remotecache-aws), it targets GCS users with minimal setup, supports lifecycle policies for automatic cache cleanup and an NX_SKIP_REMOTE_CACHE environment variable. Release cadence is moderate, with fewer updates than Nx core.

npm install nx-remotecache-gcs
INSTALL
IMPORT
SIG · NX-REMOTECACHE-GCS
N
nx-remotecache-gcs
devopsjavascriptv2.2.0
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.

nx-remotecache-gcs
const runner = require('nx-remotecache-gcs'); // Not typically imported directly, used via nx.json configuration
import ... from 'nx-remotecache-gcs'; // This is a task runner, not a library with imports; use as runner string in config
Package is not meant to be imported in code; it's configured as a runner in nx.json.

Installs the package, creates a GCS bucket, sets a lifecycle rule, configures nx.json, and runs a build to populate the remote cache.

npm install --save-dev nx-remotecache-gcs // Create bucket with gsutil (replace PROJECT_ID, BUCKET_LOCATION, BUCKET_NAME) gsutil mb -p <PROJECT_ID> -l <BUCKET_LOCATION> -b on gs://<BUCKET_NAME>/ // Set lifecycle rule (30-day auto-delete) gsutil lifecycle set node_modules/nx-remotecache-gcs/lifecycle.json gs://<BUCKET_NAME> // Configure nx.json: // { // "tasksRunnerOptions": { // "default": { // "runner": "nx-remotecache-gcs", // "options": { // "bucket": "gs://<BUCKET_NAME>", // "cacheableOperations": ["build", "test", "lint", "e2e"] // } // } // } // } // Run build to populate cache: nx run-many --target=build --all
Debug
Known issues
gotchaBucket name in options must be 'gs://BUCKET_NAME' format, not just 'BUCKET_NAME' or a URL.
fix
Use 'gs://my-bucket' in the bucket option.
affects: >=1.0.0
gotchaDefault IAM permissions allow all project viewers/editors/owners to read/write the bucket, which may leak cache artifacts.
fix
Restrict bucket access using IAM policies or bucket ACLs to only necessary service accounts/users.
affects: >=1.0.0
deprecatedThe package relies on Nx's tasksRunnerOptions configuration, which is stable but may change with Nx major versions.
fix
Keep @nx/workspace updated to a compatible version (>=16.0.0).
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module '@nx/workspace'
@nx/workspace peer dependency not installed or incompatible version.
fix
Run 'npm install @nx/workspace@latest --save-dev' to install the correct version.
bucket is required
Missing 'bucket' option in nx.json tasksRunnerOptions.default.options.
fix
Add 'bucket': 'gs://your-bucket-name' to the options object.
Error: The specified bucket does not exist
Bucket name misspelled or not created, or credentials lack access.
fix
Verify bucket name (including gs:// prefix) and ensure GCS credentials are properly set (e.g., GOOGLE_APPLICATION_CREDENTIALS environment variable).
Upgrade
Version history
2.2.0latest on npm
Audit
Dependencies
@nx/workspacerequiredPeer dependency: Nx workspace version >=16.0.0 required for task runner integration.
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
nx-remotecache-gcs — npm install nx-remotecache-gcs · libregistry