You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeScript declarations don't match runtime exports for Turnstile #46
seems like vscode asks me to use import Turnstile from 'react-turnstile';
but there is no exported component like that Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
Activity
Le0Developer commentedon Jul 31, 2026
I cannot find any version that ever exported "TurnstileTurnstile" in the types.
Where did you find this?
AshmitSherigar commentedon Jul 31, 2026
sorry i checked it again seemed like i missread the index.d.ts
i got this error when i was trying to implement this in a contact page
Le0Developer commentedon Jul 31, 2026
AshmitSherigar commentedon Jul 31, 2026
react-turnstile@1.1.5
import { Turnstile } from 'react-turnstile';
AshmitSherigar commentedon Jul 31, 2026
seems like vscode asks me to use import Turnstile from 'react-turnstile';
but there is no exported component like that
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: objectLe0Developer commentedon Jul 31, 2026
According to #45 that is because of rolldown being stupid and the reason why the named export exists now
AshmitSherigar commentedon Jul 31, 2026
Thanks for the explanation. I wasnt aware of #45. That explains why the named export was added and why I ran into the runtime issue.