Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Babel transform syntax error: Unable to handle nested super.prop usage

Đang mở
#835 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
babel, javascript, node.js
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Tái hiện lỗi bằng lệnh microbundle được báo cáo và trường hợp super.setEnabled(enabled) lồng nhau. Bắt đầu bằng cách lần theo @babel/preset-modules/lib/plugins/transform-async-arrows-in-class/index.js và lệnh gọi hoistFunctionEnvironment của nó trong stack trace. Hoàn tất khi cú pháp này được transform mà không có lỗi “Unable to handle nested super.prop usage”.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

upstream

[os]:

  • macOS Catalina 10.15.4
  • nodejs v14.4.0
  • microbundle 0.13.0

[error log]:


$ microbundle
(babel plugin) SyntaxError: /Users/chudong/workBench/xxxxx/src/tracks/microphone_audio_track.ts: Unable to handle nested super.prop usage
  42 |         return new Promise(async (resolve, reject) => {
  43 |             if (unClose) {
> 44 |                 super.setEnabled(enabled);
     |                 ^^^^^^^^^^^^^^^^
  45 |                 resolve();
  46 |                 return;
  47 |             }
SyntaxError: /Users/chudong/workBench/xxxxx/src/tracks/microphone_audio_track.ts: Unable to handle nested super.prop usage
  42 |         return new Promise(async (resolve, reject) => {
  43 |             if (unClose) {
> 44 |                 super.setEnabled(enabled);
     |                 ^^^^^^^^^^^^^^^^
  45 |                 resolve();
  46 |                 return;
  47 |             }
    at File.buildCodeFrameError (/Users/chudong/workBench/xxxxx/node_modules/@babel/core/lib/transformation/file/file.js:240:12)
    at NodePath.buildCodeFrameError (/Users/chudong/workBench/xxxxx/node_modules/@babel/traverse/lib/path/index.js:138:21)
    at hoistFunctionEnvironment (/Users/chudong/workBench/xxxxx/node_modules/@babel/traverse/lib/path/conversion.js:194:27)
    at NodePath.arrowFunctionToExpression (/Users/chudong/workBench/xxxxx/node_modules/@babel/traverse/lib/path/conversion.js:105:23)
    at PluginPass.ArrowFunctionExpression (/Users/chudong/workBench/xxxxx/node_modules/@babel/preset-modules/lib/plugins/transform-async-arrows-in-class/index.js:37:14)
    at newFn (/Users/chudong/workBench/xxxxx/node_modules/@babel/traverse/lib/visitors.js:175:21)
    at NodePath._call (/Users/chudong/workBench/xxxxx/node_modules/@babel/traverse/lib/path/context.js:55:20)
    at NodePath.call (/Users/chudong/workBench/xxxxx/node_modules/@babel/traverse/lib/path/context.js:42:17)
    at NodePath.visit (/Users/chudong/workBench/xxxxx/node_modules/@babel/traverse/lib/path/context.js:92:31)
    at TraversalContext.visitQueue (/Users/chudong/workBench/xxxxx/node_modules/@babel/traverse/lib/context.js:116:16)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Ngôn ngữ chính
JavaScript
Star
8.1k
Fork
358
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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của developit/microbundle

Tất cả issue của developit/microbundle

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.