Error when using plugin-i18next
node_modules/i18next/index.d.ts:309:18 - error TS2430: Interface 'InitOptions<T>' incorrectly extends interface 'PluginOptions<T>'.
Type 'InitOptions<T>' is not assignable to type 'Omit<{ detection?: object | undefined; backend?: T | undefined; cache?: object | undefined; i18nFormat?: object | undefined; }, never>'.
Types of property 'backend' are incompatible.
Type 'Options | undefined' is not assignable to type 'T | undefined'.
Type 'Options' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'Options'.
309 export interface InitOptions<T = object> extends PluginOptions<T> {
~~~
Found 1 error in node_modules/i18next/index.d.ts:309
11 Replies
I don't know where did this error come from :/
do you have i18next in your own package.json as well?
or run
npm ls i18next
/ yarn why i18next
@Favna
first of all,
/
implies or, I gave both because idk what package manager you use. Assuming then that you use npm
try using npm overrides (https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides) to force it to version 22.0.6, that's what the plugin was built with. Might be an incompatibility with the newer version.okkk
Solution
work by adding
"i18next": "~22.1.5"
@<3 execrate this issue has been fixed in the latest release that i just published
Nice 😉💪, you're too good
I sort of expected it but the same error poppes up in this week's renovate bumps PR