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
error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("fuse.js")' call instead. To convert this file to an ECMAScript module, change its file extension to '.mts' or create a local package.json file with { "type": "module" }.
Description of the bug
fuse.js v7.0.0
import
tsconfig.json (https://github.com/tsconfig/bases/blob/main/bases/node20.json)
package.json
typescript error
Based on comments in this thread, this package incorrectly exports typings.
microsoft/TypeScript#53045 (comment)
The error was resolved when I copied
fuse.d.ts
tofuse.d.cts
and manually editednode_modules/fuse.js/package.json
Seems like fuse.js needs to expose
d.cts
andd.ts
.The text was updated successfully, but these errors were encountered: