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

yarn build prints MODULE_TYPELESS_PACKAGE_JSON warning for mkshims.ts

オープン 初心者向け
#930 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript
領域
build-system

調査の方向性

まずビルドスクリプトと、警告を出力するコマンドとして issue が挙げている mkshims.ts を読みます。名前を mkshims.mts に変更し、新しいファイル名を使うようにビルドスクリプトを更新します。yarn build を実行します。警告なしで shims が生成されたら完了です。

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

説明

Since #863 switched to Node's built-in type stripping, yarn build prints this when it runs node ./mkshims.ts:

(node:48042) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///.../corepack/mkshims.ts is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax was detected. This incurs a performance overhead. To eliminate this warning, add "type": "module" to /.../corepack/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)
All shims have been generated.

It was mentioned in a review comment on #863 but never tracked. It doesn't affect dist/, it's just noise on every build (seen on Node 26.12.1 and in CI).

Renaming mkshims.ts to mkshims.mts and updating the build script should be enough. Adding "type": "module" to package.json would also work, but it changes how every other file in the repo gets loaded, so that seems like more risk than this warrants.

主要言語
TypeScript
スター
3.8k
フォーク
286
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

nodejs/corepack のほかの issue

nodejs/corepack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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