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
Ecmascript file had an error
2 | import { generateRandomOTP } from '../lib/utils';
3 | import { encodeBase32 } from '@oslojs/encoding';
> 4 | import { cookies } from 'next/headers';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5 | import sessionService from '@/services/session';
6 |
7 | // export async function checkEmailAvailability(email: string): Promise<boolean> {
You're importing a component that needs "next/headers". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/getting-started/react-essentials#server-components
The fun thing is that if i use ar egular button tag everything works, if i use buttonVariants() the error is there again, iam guessing that the error maybe is cva but i dont know what to do...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there!
As the title describes iam facing this error:
The fun thing is that if i use ar egular button tag everything works, if i use buttonVariants() the error is there again, iam guessing that the error maybe is cva but i dont know what to do...
Beta Was this translation helpful? Give feedback.
All reactions