react-i18next icon indicating copy to clipboard operation
react-i18next copied to clipboard

Property 'children' does not exist on type 'IntrinsicAttributes'

Open daisy1754 opened this issue 1 year ago • 3 comments

🐛 Bug Report

I am getting build error on my project where I want to introduce react-i18next. Project builds fine until I importreact-i18next and start using it. Build error is as follows

error TS2322: Type '{ children: Element; asChild: true; }' is not assignable to type 'IntrinsicAttributes & DropdownMenuTriggerProps & RefAttributes<HTMLButtonElement>'. Property 'children' does not exist on type 'IntrinsicAttributes & DropdownMenuTriggerProps & RefAttributes<HTMLButtonElement>'.

We suspect it's because react-i18next overrides IntrinsicAttributes here. https://github.com/i18next/react-i18next/blob/26ab5a3e8134efd775ee5e7d10cc77442a634ff3/index.d.ts#L54

Your Environment

Node.js v22.5.1 "react-i18next": "^15.4.0" "typescript": "^5.6.2"

daisy1754 avatar Jan 24 '25 19:01 daisy1754

Please provide a minimal reproducible example repository.

adrai avatar Jan 24 '25 19:01 adrai

Hi, i have the same problem right now. even if i'm only import something from react-i18next. immediately i'm getting this error in multiple places in my code.

did you solve the issue?

Chay-With avatar Apr 24 '25 12:04 Chay-With

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 06 '25 04:05 stale[bot]