Borewit / music-metadata

Stream and file based music metadata parser for node. Supporting a wide range of audio and tag formats.
MIT License
898 stars 90 forks source link

strtok3/core Typescript compile error 8.0.1 #1234

Closed Sieabah closed 2 years ago

Sieabah commented 2 years ago

Bug description

I believe this is a dependency issue or a type definition issue. The library does not correctly compile on typescript 4.6.3.

Expected behavior

Should compile, or at least not install for unsupported typescript versions.

#12 13.11 node_modules/music-metadata/lib/apev2/APEv2Token.d.ts:2:27 - error TS2307: Cannot find module 'strtok3/core' or its corresponding type declarations.
#12 13.11
#12 13.11 2 import { IGetToken } from 'strtok3/core';
#12 13.11                             ~~~~~~~~~~~~~~
#12 13.11 node_modules/music-metadata/lib/core.d.ts:3:26 - error TS2307: Cannot find module 'strtok3/core' or its corresponding type declarations.
#12 13.11
#12 13.11 3 import * as strtok3 from 'strtok3/core';
#12 13.11                            ~~~~~~~~~~~~~~
#12 13.11 node_modules/music-metadata/lib/core.d.ts:5:27 - error TS2307: Cannot find module 'strtok3/core' or its corresponding type declarations.
#12 13.11
#12 13.11 5 export { IFileInfo } from 'strtok3/core';
Borewit commented 2 years ago

Seems that some tool you are using does not support ESM subpath exports correctly. Best to knock on their door. I cannot exclude those tools from using this module.