An export assignment cannot be used in a module with other exported elements
I am using mathjs@14.0.1 which is installing fractionjs latest version and giving below error while building my angular project using Github Actions. The build was working fine about a week back. Seems like some new changes broke mathjs build. Please suggest the fix.
> `node_modules/fraction.js/fraction.d.ts:71:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.`
> `71 export = Fraction;`
> `node_modules/mathjs/types/index.d.ts:2:10 - error TS2596: 'Fraction' can only be imported by turning on the 'esModuleInterop' flag and using a default import.`
> `2 import { Fraction } from 'fraction.js'`
My application environment includes:
- nodejs: 14.21.3
- npm: 6.14.8
- Angular: 13.3.0
关闭于 2025-08-22 4 条评论