tsdx
tsdx copied to clipboard
TSDX build: semantic error TS2339: using 3rd party lib i18next
Hi, am getting this error on tsdx build src/index.tsx(6,9): semantic error TS2339: Property 'init' does not exist on type 'typeof import("../node_modules/i18next/index")'. I checked /node_modules/i18next/ -> the 'init' is exported in index.d.ts. as you can see in https://github.com/i18next/i18next/blob/master/index.d.ts line 1234
Steps: npx tsdx create mylib cd mylib npm install i18next -save
index.tsx
import i18next from 'i18next';
i18next.init({
fallbackLng: 'en',
debug: true,
interpolation: {
escapeValue: false,
}
})
}
npm run build (typescript) Error: C:/DEV/mylib/src/index.tsx(6,9): semantic error TS2339: Property 'init' does not exist on type 'typeof import("C:/DEV/mylib/node_modules/i18next/index")'.
https://github.com/i18next/i18next/blob/master/index.d.ts also on lines 1492 1493 and 1498 i18inext is declared and exported, as well as the init function.
Also having this issue with i18next
as a peer dependency