Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#835 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
babel, javascript, node.js

Research direction

Reproduce the failure with the reported microbundle command and the nested super.setEnabled(enabled) case. Start by tracing @babel/preset-modules/lib/plugins/transform-async-arrows-in-class/index.js and its hoistFunctionEnvironment call in the stack trace. Done means this syntax transforms without the “Unable to handle nested super.prop usage” error.

Written by the indexing model from the issue text.

Description

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.
Dominant language
JavaScript
Stars
8.1k
Forks
358
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from developit/microbundle

All issues in developit/microbundle

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.