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
Solution:
work by adding "i18next": "~22.1.5"...
Jump to solution
11 Replies
Alexandre
AlexandreOP•2y ago
I don't know where did this error come from :/
Favna
Favna•2y ago
do you have i18next in your own package.json as well? or run npm ls i18next / yarn why i18next
Alexandre
AlexandreOP•2y ago
Alexandre
AlexandreOP•2y ago
@Favna
Alexandre
AlexandreOP•2y ago
Favna
Favna•2y ago
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.
Alexandre
AlexandreOP•2y ago
okkk
Solution
Alexandre
Alexandre•2y ago
work by adding "i18next": "~22.1.5"
Favna
Favna•2y ago
@<3 execrate this issue has been fixed in the latest release that i just published
Alexandre
AlexandreOP•2y ago
Nice 😉💪, you're too good
Favna
Favna•2y ago
I sort of expected it but the same error poppes up in this week's renovate bumps PR
Want results from more Discord servers?
Add your server