Closed vladimiry closed 1 year ago
Thanks for the report, @vladimiry ! I apologize for the delay. I've been pretty tied up this year.
I will add support and update this thread when it's ready!
A patch like this https://github.com/vladimiry/ElectronMail/blob/master/patches/typescript-transform-paths%403.3.1.patch resolves the issue for me (not sure if it handles all the cases).
The import assertion thing was added in TS by https://github.com/microsoft/TypeScript/commit/ec114b8931bf1ad15fd017ecbacf09e099338820
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#import-assertions
Currently, the import assertion is being lost (since
node.assertClause
is not taken into the consideration bytypescript-transform-paths
) and so you get theERR_IMPORT_ASSERTION_TYPE_MISSING
-like error if node >= 16.14 is used (previous versions don't force import assertion, like for importing json files with--experimental-json-modules
arg).