This error doesn't affect functionality somehow. The program runs/compiles fine and translations work as expected. The issue is that we're trying to generate TypeDoc documentation and this error prevents us from doing so.
The error shows up in multiple places, but here's an example:
export type WithT<Ns extends Namespace = DefaultNamespace> = i18nextMod.WithT<Ns>;
node_modules\i18next\index.d.mts
They are all within the node_modules
folder so there's no way to edit code at the source of the error. Am I missing another dependency? Did I set up my translations incorrectly? The error itself is not helpful at all for me.
Okay, so I finally figured this out. You need to specify a default namespace or use 'translation' as a namespace. I have no idea why this is required, but it fixes the error.
...
declare module "i18next" {
interface CustomTypeOptions {
defaultNS: "YOUR_NAMESPACE_HERE";
resources: {
...
This is unique to your project, but this sample may clear up confusion: Example Project