Skip to content

vp install should respect .npmrc/custom registry config in CI without requiring registry-url #50

@crusty-voidzero

Description

@crusty-voidzero

Summary

setup-vp should make vp install behave the same way as in-repo installs that already rely on .npmrc for registry configuration, including custom registries such as GitHub Packages.

Today, vp install in GitHub Actions appears to require explicitly passing registry-url to voidzero-dev/setup-vp@v1 even when the repository already has the correct registry settings in .npmrc and auth is provided via NODE_AUTH_TOKEN.

Current behavior

A workflow like this works:

- uses: voidzero-dev/setup-vp@v1
  with:
    cache: true
    registry-url: https://npm.pkg.github.com
  env:
    NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

But without registry-url, install fails with missing auth / registry-related errors, even though the project .npmrc already contains the expected registry config.

A workaround is to skip the install step in setup-vp and do the install manually later:

- uses: voidzero-dev/setup-vp@v1
  with:
    node-version: ${{ matrix.node-version }}
    cache: true
    run-install: false
- uses: pnpm/action-setup@v6
- run: pnpm install
  env:
    NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

Expected behavior

vp install should respect the repository's .npmrc the same way normal in-repo installs do:

  • custom registry config should be picked up automatically
  • auth from standard npm envs such as NODE_AUTH_TOKEN should work without extra action-specific config
  • users should not need to duplicate registry configuration in the workflow if it is already declared in the repo

Why this matters

This makes CI behavior differ from local behavior and from plain pnpm install, which is confusing and easy to misconfigure.

Related context

Reported from real GitHub Actions usage while installing private GitHub packages for Vite+ deploy workflows.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions