[Bug]: 8.0.0-alpha.9 [commander] TypeError: Cannot read properties of undefined (reading 'program')ย #16547
Closed
Description
๐ป
- Would you like to work on a fix?
How are you using Babel?
@babel/cli
Input code
-const program = commander.default.program;
+const program = commander.program;
There's no default export in commander.
https://unpkg.com/browse/commander@12.1.0/esm.mjs
Configuration file name
No response
Configuration
No response
Current and expected behavior
TypeError: Cannot read properties of undefined (reading 'program')
at file:///home/runner/work/devtools/devtools/node_modules/@babel/cli/lib/babel/options.js:6:3[5](https://github.com/neetly/devtools/actions/runs/9354327396/job/25746947060?pr=22#step:8:6)
at ModuleJob.run (node:internal/modules/esm/module_job:262:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:475:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:109:5)
Environment
System:
OS: Linux 6.9 Arch Linux
Binaries:
Node: 22.2.0 - ~/.pkgx/nodejs.org/v22.2.0/bin/node
Yarn: 4.2.2 - ~/.pkgx/yarnpkg.com/v4.2.2/bin/yarn
npm: 10.8.0 - ~/.pkgx/npmjs.com/v10.8.0/bin/npm
Monorepos:
Yarn Workspaces: 4.2.2
npmPackages:
@babel/cli: 8.0.0-alpha.9 => 8.0.0-alpha.9
@babel/core: 8.0.0-alpha.9 => 8.0.0-alpha.9
eslint: 9.4.0 => 9.4.0
Possible solution
No response
Additional context
No response