Skip to content

PNPM_CONFIG_USERCONFIG doesn't work #11465

@Perdolique

Description

@Perdolique

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

11.0.4

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

  1. Use NPM_CONFIG_USERCONFIG=/tmp/custom.npmrc with authentication inside for a private repo and pnpm v10.33.2
  2. Upgrade pnpm to v11
  3. Rename NPM_CONFIG_USERCONFIG to PNPM_CONFIG_USERCONFIG as mentioned in the migration guide/breaking changes.

Describe the Bug

I've renamed NPM_CONFIG_USERCONFIG to PNPM_CONFIG_USERCONFIG as it was mentioned in the migration guide and breaking changes, but it doesn't work. I haven't found a way to make pnpm v11 read a custom .npmrc file using environment variables (tried pnpm_config_npmrcauthfile, pnpm_config_npmrc_auth_file). It's not clear how to do that from the documentation.

Expected Behavior

  • Renamed environment variable does work as expected.
  • Documentation has a clear example of how to use a custom path to the .npmrc file.

Which Node.js version are you using?

24

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions