Source maps not working with standard input
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- devtools
調査の方向性
まず node dist/bundle.js と cat dist/bundle.js | node で問題を再現し、ここに示されている source-mapped のスタックトレースと [stdin] のスタックトレースを比較します。source-map-support が標準入力から提供されたスクリプトをどのように処理するかを追跡します。標準入力からの呼び出しで元のソース位置と行情報が報告され、両方のコマンドを対象とする回帰テストが追加されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Below is the source file I am using:
require('source-map-support').install();
throw new Error('error on line two');
The following command will generate the correct output:
node dist/bundle.js
output:
/Users/nick/Desktop/dist/webpack:/example/index.js:2
throw new Error('error on line two');
^
Error: error on line two
at Object.<anonymous> (/Users/nick/Desktop/dist/webpack:/example/index.js:2:1)
at __webpack_require__ (/Users/nick/Desktop/dist/webpack:/webpack/bootstrap 8d9d0b53441c2ea13b08:19:1)
at /Users/nick/Desktop/dist/webpack:/webpack/bootstrap 8d9d0b53441c2ea13b08:39:1
at Object.<anonymous> (/Users/nick/Desktop/dist/bundle.js:43:10)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
The following command with not generate a line number or other source map information:
cat dist/bundle.js | node
output:
Error: error on line two
at Object.<anonymous> ([stdin]:48:8)
at __webpack_require__ ([stdin]:20:30)
at [stdin]:40:18
at [stdin]:43:10
at ContextifyScript.Script.runInThisContext (vm.js:23:33)
at Object.exports.runInThisContext (vm.js:74:17)
at Object.<anonymous> ([stdin]-wrapper:6:22)
at Module._compile (module.js:571:32)
at Immediate.<anonymous> (bootstrap_node.js:387:29)
at runCallback (timers.js:651:20)
The issue seems to arise when passing a script via standard input to node. I originally discovered it when I was creating a child process in node and passing generated code to it.
Please let me know if any more information is needed.
Thank you for your time in supporting this awesome project, and for taking the time to help me.
- 主要言語
- JavaScript
- スター
- 2.2k
- フォーク
- 221
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
evanw/node-source-map-support のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
evanw/node-source-map-support#344 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
evanw/node-source-map-support#343 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
evanw/node-source-map-support#337 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
evanw/node-source-map-support#333 ·
-
Provide esm versionオープン
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
evanw/node-source-map-support#330 · コメント 2 件 · リアクション 9 件 ·
evanw/node-source-map-support の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
andromarces/agent-loops#886 ·
メンテナーはふだん 1 日以内に返信
-
bug effort:low model:light plan planner:gpt-6-1-sol tests
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
B: visual
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
FreeTubeApp/FreeTube#9929 ·
メンテナーはふだん 1 日以内に返信
-
🐛 Bug: `--clear-screen` not very useful (at least not for dealing with large test/error output)オープンstatus: in triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
mochajs/mocha#6428 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
🔧 in development
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100