diff --git a/.changeset/thick-countries-deny.md b/.changeset/thick-countries-deny.md new file mode 100644 index 0000000000..733db07535 --- /dev/null +++ b/.changeset/thick-countries-deny.md @@ -0,0 +1,6 @@ +--- +"@pnpm/run-npm": patch +"pnpm": patch +--- + +The npm CLI executed from pnpm should not use Corepack [#7747](https://github.com/pnpm/pnpm/pull/7747). diff --git a/exec/run-npm/src/index.ts b/exec/run-npm/src/index.ts index fb023ccbf5..f6e0ff740b 100644 --- a/exec/run-npm/src/index.ts +++ b/exec/run-npm/src/index.ts @@ -14,7 +14,7 @@ export function runNpm (npmPath: string | undefined, args: string[], options?: R cwd: options?.cwd ?? process.cwd(), stdio: 'inherit', userAgent: undefined, - env: options?.env ?? {}, + env: { ...options?.env, COREPACK_ENABLE_STRICT: '0' }, }) }