You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…dule-lexer` (#4409)
```
> monitor-oxc@ test /home/runner/work/monitor-oxc/monitor-oxc
> node src/main.test.mjs
file:///home/runner/work/monitor-oxc/monitor-oxc/node_modules/.pnpm/inquirer@[10](https://github.com/oxc-project/monitor-oxc/actions/runs/10038139357/job/27739464680#step:8:11).0.1/node_modules/inquirer/dist/esm/ui/prompt.mjs:2
import { defer, EMPTY, from, of, concatMap, filter, reduce, isObservable, lastValueFrom } from "rxjs";
^^^^^
SyntaxError: Named export 'EMPTY' not found. The requested module 'rxjs' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'rxjs';
const { defer, EMPTY, from, of, concatMap, filter, reduce, isObservable, lastValueFrom } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:[12](https://github.com/oxc-project/monitor-oxc/actions/runs/10038139357/job/27739464680#step:8:13)3:5)
Node.js v20.15.1
```
Export is undefined when `enumerable` is "!0".
See `https://github.com/nodejs/cjs-module-lexer/issues/64`
Input File:
Expected Result:
["a", "b"]
Actual Result:
["a"]
We can get this case when we use
uglifyjs
to minify our source code.The Error is occured in https://github.com/guybedford/cjs-module-lexer/blob/a96e7b52b99d39fee25d69f356905161d14a15ed/lexer.js#L370
Here is a simple solution:
The text was updated successfully, but these errors were encountered: