Newshot
Account

Vercel Sandbox now supports managed npm credentials

Summary

Vercel Sandbox can now install your team's private npm packages using credentials stored in team Shared Environment Variables . Custom registries such as GitHub Packages and JFrog Artifactory are also supported. Pass credentials: { npm: true } when creating a sandbox to let it use your team's existing npm credentials. Tokens stay outside the sandbox. The firewall adds authentication to install requests sent to your configured registries, so a coding agent can install dependencies without seeing the tokens. Update your Sandbox SDK or CLI to the latest version. Read the npm credentials documentation to get started. Read more

Original text(via Vercel Blog)

Vercel Sandbox can now install your team's private npm packages using credentials stored in team Shared Environment Variables. Custom registries such as GitHub Packages and JFrog Artifactory are also supported.

Pass credentials: { npm: true } when creating a sandbox to let it use your team's existing npm credentials.


        import { Sandbox } from "@vercel/sandbox";
const sandbox = await Sandbox.create({ credentials: { npm: true } });// Clone or copy project files into the sandbox's working directory first.await sandbox.runCommand("pnpm", ["install"]);
      

Create a sandbox with managed npm credentials for private package installs.

Tokens stay outside the sandbox. The firewall adds authentication to install requests sent to your configured registries, so a coding agent can install dependencies without seeing the tokens.

Update your Sandbox SDK or CLI to the latest version.


        pnpm add @vercel/sandbox@latest
      

Upgrade the Sandbox SDK or CLI.

Read the npm credentials documentation to get started.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Vercel Blog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗