lukasgeiter / gettext-extractor

A flexible and powerful Gettext message extractor with support for JavaScript, TypeScript, JSX and HTML.
MIT License
98 stars 21 forks source link

Issues with latest pofile #32

Closed jwalton closed 5 years ago

jwalton commented 5 years ago

I just deleted my package-lock.json and reinstalled everything, so I'm pickup up the latest gettext-extractor and pofile, and I'm getting these errors in my build:

node_modules/gettext-extractor/dist/extractor.d.ts(1,25): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.
node_modules/gettext-extractor/dist/extractor.d.ts(23,36): error TS2702: 'pofile' only refers to a type, but is being used as a namespace here.
node_modules/gettext-extractor/dist/extractor.d.ts(24,53): error TS2702: 'pofile' only refers to a type, but is being used as a namespace here.
node_modules/gettext-extractor/dist/extractor.d.ts(25,58): error TS2702: 'pofile' only refers to a type, but is being used as a namespace here.
jwalton commented 5 years ago

Yeah, forcing pofile down to 1.0.11 via package-lock.json seems to fix this.

lukasgeiter commented 5 years ago

Thanks a lot for reporting this!

pofile completely rewrote the types in the latest release causing this issue. Unfortunately I was not able to make my code work with the new types (and I don't seem to be the only one) so instead I've locked the version to 1.0.x. The fix is released with version 3.5.1.

jwalton commented 5 years ago

Thanks for the quick fix! :)