Skip to content

"Unknown user/project config" warnings starting in npm 11.2.0 #8153

Open
@pplmx

Description

@pplmx

---Added by npm team---

See this comment #8153 (comment) for the proper way to have package-level config that does not collide with npm config

Summary

When running npm --version, npm issues warnings about some custom configuration keys in my .npmrc. These warnings indicate that the keys will stop working in the next major version of npm.

Environment

  • node version: v23.9.0
  • npm version: 11.2.0
  • Win11

Steps to Reproduce

  1. Create a .npmrc file with the following content:

    registry="https://registry.npmmirror.com/"
    electron_mirror="https://npmmirror.com/mirrors/electron/"
    electron_custom_dir="{{ version }}"
    electron_builder_binaries_mirror="http://npmmirror.com/mirrors/electron-builder-binaries/"
  2. Run the command:

    npm --version
  3. Observe the following warnings:

    npm warn Unknown user config "electron_mirror". This will stop working in the next major version of npm.
    npm warn Unknown user config "electron_custom_dir". This will stop working in the next major version of npm.
    npm warn Unknown user config "electron_builder_binaries_mirror". This will stop working in the next major version of npm.

Expected Behavior
The custom configuration keys should be recognized, or there should be documentation clarifying the correct way to set these options without triggering warnings.

Actual Behavior
The custom keys (electron_mirror, electron_custom_dir, and electron_builder_binaries_mirror) are not recognized by npm, resulting in warning messages about their future deprecation.

Questions

  1. Are these warnings expected with the current configuration, or is there a recommended way to define these custom options?
  2. Will these configurations be supported in future versions of npm, or should they be modified/removed to ensure compatibility?

Additional Context
I am using custom mirror URLs to optimize package and binary downloads. Any guidance or documentation regarding the proper configuration for these settings would be greatly appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions