Unable to use Vapi in Next.js
# support
I have a Next.js app using the app directory, and I'm already converting the file that vapi is being instanciated in to a client file. But, when i emit an event from vapi, e.g vapo.on("call-start" , fn), i get this error:
Copy code
TypeError: Cannot read properties of undefined (reading 'ondevicechange')

Call Stack
node_modules/.pnpm/@daily-co+daily-js@0.57.4/node_modules/@daily-co/daily-js/dist/daily-esm.js (7:109991)
How do i fix this? plz.
This is because its not abel to get the navigator object. Converting it to a client component will resolve the issue.