Issue in consumer.originalPositionFor method is returning the lineNumber of next line of code in NextJs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, next.js
- Lĩnh vực
- devtools
Hướng nghiên cứu
Bắt đầu từ consumer.originalPositionFor và kiểm tra lineNumber, columnNumber và rawSourceMap được cung cấp từ stack frame đầu tiên. Tái hiện bằng một chunk do Next.js tạo ra và so sánh các mapping xung quanh những dòng trống được báo cáo; hoàn tất khi có một fixture tối thiểu với mapping dự kiến đã được xác nhận hoặc một giới hạn được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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;
- Ngôn ngữ chính
- JavaScript
- Star
- 3.7k
- Fork
- 370
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mozilla/source-map
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
mozilla/source-map#530 ·
-
allow wasm to be bundled Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
mozilla/source-map#527 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
mozilla/source-map#524 · 6 bình luận ·
-
source map seems like not work, is there some hints from the perspective of source-map tool? Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
mozilla/source-map#516 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
mozilla/source-map#510 · 1 reaction ·
Tất cả issue của mozilla/source-map
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
-
Issue-Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
sugarlabs/musicblocks#8924 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Đang mởcustomer-eng status: needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100