diff --git a/apps/rush/src/RushVersionSelector.ts b/apps/rush/src/RushVersionSelector.ts index 1b87e66e5f..615aaa0e35 100644 --- a/apps/rush/src/RushVersionSelector.ts +++ b/apps/rush/src/RushVersionSelector.ts @@ -62,7 +62,10 @@ export class RushVersionSelector { // different implementations of the same version of the same package. // This was needed for: https://github.com/microsoft/rushstack/issues/691 commonRushConfigFolder: configuration ? configuration.commonRushConfigFolder : undefined, - suppressOutput: true + suppressOutput: true, + // Filter out npm-incompatible properties (e.g. pnpm-specific settings) from .npmrc + // since this installation always uses npm regardless of the repo's package manager. + filterNpmIncompatibleProperties: true }); console.log(`Successfully installed Rush version ${version} in ${expectedRushPath}.`); diff --git a/common/changes/@microsoft/rush/fix-rush-pnpm-npm-config-warnings_2026-03-23-18-16.json b/common/changes/@microsoft/rush/fix-rush-pnpm-npm-config-warnings_2026-03-23-18-16.json new file mode 100644 index 0000000000..c34b0155c3 --- /dev/null +++ b/common/changes/@microsoft/rush/fix-rush-pnpm-npm-config-warnings_2026-03-23-18-16.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Filter npm-incompatible properties from .npmrc when installing rush-lib via npm, to eliminate spurious \"Unknown env config\" and \"Unknown project config\" warnings.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +}