Riley-Brown/react-speech-to-text

I can't use the react-hook-speech-to-text in next.js

Opened this issue · 1 comments

Hi, everyone. I am trying to use react-hook-speech-to-text module in my Next.js Chatbot but I get the error when I try to deploy to Vercel.
Some dependencies are missing.
Please let me know if you have the experience with that.

KiraLT commented

I had error ReferenceError: navigator is not defined. To solve this I followed this suggestion. To sum up:

  1. Create a separate component where you use react-hook-speech-to-text
  2. Use lazy loading to import it and specify { ssr: false }