Issue in consumer.originalPositionFor method is returning the lineNumber of next line of code in NextJs
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, next.js
- 領域
- devtools
調査の方向性
consumer.originalPositionFor から始め、最初のスタックフレームから渡される lineNumber、columnNumber、rawSourceMap を調べます。Next.js が生成した chunk で再現し、報告された空行の周辺の mappings を比較します。最小限の fixture に確認済みの期待される mapping があるか、文書化された制限があれば完了です。
索引モデルが issue の本文から書いたものです。
説明
So, I have implemented the source-map package and I am trying to find the lineNumber and originalFile of the production error from the JS chunk. I have implemented in in create-react-app and it's working fine.
But when I am implementing it in NextJS it's returning the lineNumber of the next piece of code where the error is getting generated.
For eg: If the error is introduced in lineNumber 45 and then next piece of code is written in lineNumber 50, in between line number 45 and 50 is space then I am getting line Number as 50 from consumer.originalPositionFor.
Implementation Details:
Implemented Source Map package like this :
rawSourceMap -- is the source map file for JS chunk where the error occurred.
Getting this info from the first frame of the error stack trace.
const consumer = await new SourceMapConsumer(rawSourceMap);
const originalPosition = consumer.originalPositionFor({
line: lineNumber,
column: columnNumber,
});
return originalPosition;
- 主要言語
- JavaScript
- スター
- 3.7k
- フォーク
- 370
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mozilla/source-map のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
mozilla/source-map#530 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
mozilla/source-map#527 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
mozilla/source-map#524 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
mozilla/source-map#516 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
mozilla/source-map#510 · リアクション 1 件 ·
mozilla/source-map の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
antfu-collective/icones#398 ·
-
ECmail.com オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
wesbos/burner-email-providers#554 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
components-web-app/docs#92 ·