-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CustomEvent is not defined #1020
Comments
Hi @ha-sante,
Yes that is correct. The SDK includes a class that extends the CustomEvent API. Does the error stop your app from working entirely or is it "just" an SSR error? If it is the former, you could try a dynamic import similar to what is shown in the docs for
Alternatively, you could also try using next/dynamic. |
Will look into this @lfleischmann and report back |
Your most welcome |
adding // layout.tsx | page.tsx | route.ts
export const dynamic = "force-dynamic"; |
I tried to add the route config in the root layout, but didnt work. The error in the console is annoying |
Hey @sojinsamuel this issue has been fixed, we need to dynamic import the component where we use it. We'll be updating the docs soon import dynamic from 'next/dynamic';
const HankoAuth = dynamic(() => import('@/components/HankoAuth'), { ssr: false })
export default function LoginPage() {
return (
<HankoAuth />
);
} |
Closing this, as the issue has been addressed. |
Checklist
Describe the bug
Using the "@teamhanko/hanko-frontend-sdk": "^0.8.0", in "next": "13.4.7",
Reproducing the bug
I'd reckon how to reproduce this error is to
Logs
Configuration
No response
Hanko Version
0.8.0
OS Hanko Backend
None
OS Version Hanko Backend
No response
OS
None
OS Version
No response
Browser Version
Chrome
Environment
None
Additional Context
No response
The text was updated successfully, but these errors were encountered: