When using pnpm in project, ICU instance's type will be imcompatible with i18next.use
To Reproduce
use pnpm to install dependencies.
import i18next from 'i18next';
import ICU from 'i18next-icu';
const icu = new ICU();
// ts error on blow 'icu'
i18next.use(icu).init();
Type 'IcuInstance<IcuConfig>' provides no match for the signature 'new (...args: any[]): Module'.ts(2345)
as pnpm will not hoist all dependencies to root's node_modules. i18next-icu will not have access to i18next unless dependency was declared in package.json.
🐛 Bug Report
When using pnpm in project, ICU instance's type will be imcompatible with i18next.use
To Reproduce
use pnpm to install dependencies.
Type 'IcuInstance<IcuConfig>' provides no match for the signature 'new (...args: any[]): Module'.ts(2345)
as pnpm will not hoist all dependencies to root's node_modules. i18next-icu will not have access to i18next unless dependency was declared in package.json.
Possible solution
add i18next as dependency in package.json
link to pnpm issue https://github.com/pnpm/pnpm/discussions/3788