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

Not working with pnpm

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

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

評価

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

調査の方向性

リンクされた再現手順と src/lib/actions/versions.ts の 362-368 行付近のコードから始め、次に src/lib/util/dependencies.ts の 145-209 行にあるパス処理を追ってください。論理的な filePath と modsToFilePath の realpath キーを比較し、pnpm で空の map を再現してください。再現手順で空の Found map やソースの欠落が報告されなくなれば完了です。

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

説明

high priority unverified

Reproduction: https://github.com/vjpr/repro-inspectpack-pnpm-test


Possibly related: https://github.com/FormidableLabs/inspectpack/issues/131


Upon compiling I get the following error.

Compiled with warnings.

Missing sources: Expected 4, found 0.
Found map: {}

Notice how Found map: {}.

I've tracked down what is causing the map to be empty to here:

https://github.com/FormidableLabs/inspectpack/blob/917c7c9ba5118ae19b5992ed0afd505dbf6ba460/src/lib/actions/versions.ts#L362-L368

filePath = /Users/Vaughan/dev/inspectpack-pnpm-test/packages/cra/node_modules/react-refresh
modsToFilePath = {
  "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh": [
    {
      "baseName": "react-refresh/cjs/react-refresh-runtime.development.js",
      "chunks": [
        0
      ],
      "identifier": "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]_427212bc1158d185e577033f19ca0757/node_modules/babel-loader/lib/index.js??ref--5-oneOf-3!/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh/cjs/react-refresh-runtime.development.js",
      "isNodeModules": true,
      "isSynthetic": false,
      "size": 23198,
    },
    {
      "baseName": "react-refresh/runtime.js",
      "chunks": [
        0
      ],
      "identifier": "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]_427212bc1158d185e577033f19ca0757/node_modules/babel-loader/lib/index.js??ref--5-oneOf-3!/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh/runtime.js",
      "isNodeModules": true,
      "isSynthetic": false,
      "size": 221,
      "source": "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-refresh-runtime.production.min.js');\n} else {\n  module.exports = require('./cjs/react-refresh-runtime.development.js');\n}"
    }
  ],
  "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh": [
    {
      "baseName": "react-refresh/cjs/react-refresh-runtime.development.js",
      "chunks": [
        0
      ],
      "identifier": "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]_427212bc1158d185e577033f19ca0757/node_modules/babel-loader/lib/index.js??ref--5-oneOf-3!/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh/cjs/react-refresh-runtime.development.js",
      "isNodeModules": true,
      "isSynthetic": false,
      "size": 23096,
    },
    {
      "baseName": "react-refresh/runtime.js",
      "chunks": [
        0
      ],
      "identifier": "/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]_427212bc1158d185e577033f19ca0757/node_modules/babel-loader/lib/index.js??ref--5-oneOf-3!/Users/Vaughan/dev/inspectpack-pnpm-test/node_modules/.pnpm/[email protected]/node_modules/react-refresh/runtime.js",
      "isNodeModules": true,
      "isSynthetic": false,
      "size": 221,
    }
  ]
}

Notice how modsToFilePath's keys are the "realpath" of the package, whereas filePath is the "logical path".

filePath seems to comes from here:

https://github.com/FormidableLabs/inspectpack/blob/917c7c9ba5118ae19b5992ed0afd505dbf6ba460/src/lib/util/dependencies.ts#L145-L209

However I have reached the point where I don't understand what is going on and maybe a maintainer could quickly point to the right fix?

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

環境構築

はじめの一歩

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

FormidableLabs/inspectpack のほかの issue

FormidableLabs/inspectpack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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