Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Bug: corepack ignores COREPACK_NPM_REGISTRY for yarnpkg registry

オープン
#753 コメント 1 件 リアクション 15 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
node.js, typescript
領域
tooling

調査の方向性

config.json と sources/corepackUtils.ts および sources/npmRegistryUtils.ts のレジストリ処理コード、特に参照されている行から始めてください。COREPACK_NPM_REGISTRY が npmjs.org にどのように適用されるか、また registry.yarnpkg.com をカバーしない理由を追跡してください。Corepack が設定されたプロキシを Yarn レジストリに一貫して使用でき、サポートされている設定動作が明確に確立されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Conditions for bug

npmjs.org and yarnpkg.com are blocked on my laptop

Background and things I've tried

We have an internal registry mirror which mirrors both npmjs and yarnpkg. Due to a recent supply chain attack it is a policy that my laptop blocks both npmjs and yarnpkg so I'm not able to reach them directly. All of my JS RC files are set to reach out to corporate proxy:

  • ~/.npmrc
  • ~/.yarnrc
  • ~/.yarnrc.yml

I learned that corepack ignores all of these files and instead reaches out to registries directly. I was able to partially work around this by setting the following environment variable.

export COREPACK_NPM_REGISTRY="<my corporate proxy>"

Setting this environment variable gets me past errors for registry.npmjs.org but still triggers errors for registry.yarnpkg.com.

Potentially buggy lines of code

Because https://registry.yarnpkg.com does not match https://registry.npmjs.org there's no proxying available.

Desired solution

  • Ideally: adhere to ~/.yarnrc.yml
  • Or adhere to COREPACK_NPM_REGISTRY
  • Or introduce a new environment variable COREPACK_YARN_REGISTRY
  • Or more robust environment variable which allows one to substitute multiple registries via some kind of expression syntax.
主要言語
TypeScript
スター
3.8k
フォーク
279
平均マージ
1時間 47分
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nodejs/corepack のほかの issue

nodejs/corepack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。