---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
-
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/"
-
Run the command:
-
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
- Are these warnings expected with the current configuration, or is there a recommended way to define these custom options?
- 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.
---Added by npm team---
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
Steps to Reproduce
Create a
.npmrcfile 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/"Run the command:
Observe the following warnings:
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, andelectron_builder_binaries_mirror) are not recognized by npm, resulting in warning messages about their future deprecation.Questions
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.