Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vercel/remote-nx

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/remote-nx

Remote caching for @nrwl/nx using Vercel Remote Cache

  • 0.0.9
  • npm
  • Socket score

Version published
Weekly downloads
6.4K
decreased by-23.38%
Maintainers
2
Weekly downloads
 
Created
Source

@vercel/remote-nx

@vercel/remote-nx

This project implements a task runner for @nrwl/nx that caches build artifacts in the Vercel Remote Cache.

Table of Contents

Setup

Let's assume you already have a Vercel Account. For the rest of the guide you will need a Vercel Access Token and your team ID. You can create a vercel access token in your account settings. Your team ID can be found under your team settings page.

Have those handy as we'll need them to authorize your monorepo to Vercel's remote cache.

Usage

npm install --save-dev @vercel/remote-nx

In your nx.json file you will find a tasksRunnerOptions field. Update this field so that it's using the installed @vercel/remote-nx

{
  "tasksRunnerOptions": {
    "default": {
      "runner": "@vercel/remote-nx",
      "options": {
        "cacheableOperations": ["build", "test", "lint", "e2e"],
        "token": "<token>",
        "teamId": "<teamId>"
      }
    }
  }
}

You can specify your token and teamId in your nx.json or set them as environment variables.

ParameterDescription Environment Variable / .envnx.json
Vercel Access TokenVercel access token with access to the provided teamNX_VERCEL_REMOTE_CACHE_TOKENtoken
Vercel Team ID (optional)The Vercel Team ID that should share the Remote CacheNX_VERCEL_REMOTE_CACHE_TEAMteamId

Run it 🚀

Clear your local cache and rebuild your project.

nx reset
nx build

Advanced Configuration

OptionDescription
verboseSet to receive full stack traces whenever errors occur. Best used for debugging. Default: false
silentSet to mute success and info logs. Default: false
dotenvSet to false to disable reading .env into process.env. Default: true
dotenvPathSet to read .env files from a different folder.
"tasksRunnerOptions": {
  "default": {
    "runner": "@vercel/remote-nx",
    "options": {
      "verbose": true,
      "silent": true
    }
  }
}

Credit to nx-remotecache-custom examples.

Keywords

FAQs

Package last updated on 19 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc