Usage in Angular 16 app results in: Cannot find module 'chord_sheet/item' or its corresponding type declarations.
Closed this issue · 3 comments
typekpb commented
Importing ChordSheetJS
in my Angular 16 app:
import ChordSheetJS from "chordsheetjs";
results in error:
Error: node_modules/chordsheetjs/lib/main.d.ts:1419:34 - error TS2307: Cannot find module 'chord_sheet/item' or its corresponding type declarations.
1419 isEvaluatable: (item: import("chord_sheet/item").default) => boolean;
~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1420:38 - error TS2307: Cannot find module 'chord_sheet/item' or its corresponding type declarations.
1420 isChordLyricsPair: (item: import("chord_sheet/item").default) => boolean;
~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1422:26 - error TS2307: Cannot find module 'chord_sheet/item' or its corresponding type declarations.
1422 isTag: (item: import("chord_sheet/item").default) => boolean;
~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1430:29 - error TS2307: Cannot find module 'chord_sheet/chord_pro/evaluatable' or its corresponding type declarations.
1430 evaluate: (item: import("chord_sheet/chord_pro/evaluatable").default, metadata: Metadata, configuration: import("formatter/configuration/configuration").default) => string;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1430:117 - error TS2307: Cannot find module 'formatter/configuration/configuration' or its corresponding type declarations.
1430 evaluate: (item: import("chord_sheet/chord_pro/evaluatable").default, metadata: Metadata, configuration: import("formatter/configuration/configuration").default) => string;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1459:38 - error TS2307: Cannot find module 'chord_sheet/item' or its corresponding type declarations.
1459 isEvaluatable: (item: import("chord_sheet/item").default) => boolean;
~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1460:42 - error TS2307: Cannot find module 'chord_sheet/item' or its corresponding type declarations.
1460 isChordLyricsPair: (item: import("chord_sheet/item").default) => boolean;
~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1462:30 - error TS2307: Cannot find module 'chord_sheet/item' or its corresponding type declarations.
1462 isTag: (item: import("chord_sheet/item").default) => boolean;
~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1470:33 - error TS2307: Cannot find module 'chord_sheet/chord_pro/evaluatable' or its corresponding type declarations.
1470 evaluate: (item: import("chord_sheet/chord_pro/evaluatable").default, metadata: Metadata, configuration: import("formatter/configuration/configuration").default) => string;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/chordsheetjs/lib/main.d.ts:1470:121 - error TS2307: Cannot find module 'formatter/configuration/configuration' or its corresponding type declarations.
1470 evaluate: (item: import("chord_sheet/chord_pro/evaluatable").default, metadata: Metadata, configuration: import("formatter/configuration/configuration").default) => string;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
martijnversluis commented
@typekpb Thanks for reaching out. I'm putting this on the board to investigate the issue. Which exact version are you using, and could you verify if the issue persist with the latest version (8.1.0
)?
typekpb commented
Hey @martijnversluis , it's 8.1.0 one I'm trying to use. thanks!
martijnversluis commented
@typekpb I released 8.2.0
which now should ship a correct main.d.ts
. This file is now also validated on CI, so no new issues should end up in the build.