Skip to content

TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. #2919

@Maxim-Mazurok

Description

@Maxim-Mazurok

Describe the bug
Getting the following error:

tsc --noEmit        
../bla/node_modules/mathjs/types/index.d.ts:5:1 - error TS1203: Export assignment cannot be used when targeting 
ECMAScript modules. Consider using 'export default' or another module format instead.

5 export = math
  ~~~~~~~~~~~~~


Found 1 error in ../balances/node_modules/mathjs/types/index.d.ts:5

To Reproduce
I have "type": "module" in my package.json and

"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node16"

in my TSConfig, using TS v5.0.2, it used to work with TS v4.9.5

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions