Skip to content

[bug] SyntaxError: Named export 'JsxEmit' not found. The requested module 'typescript' is a CommonJS module, #1095

Closed
@crazyming9528

Description

@crazyming9528

Describe the bug

import { JsxEmit } from 'typescript';
^^^^^^^
SyntaxError: Named export 'JsxEmit' not found. The requested module 'typescript' 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 'typescript';
const { JsxEmit } = pkg;

Image

Reproduction

No response

Expected behavior

No response

Platform and versions

eslint-react  version: 1.48.4

Stack trace


Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: ReleasedThe issue has been releasedType: BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions