react-speech-recognition
react-speech-recognition copied to clipboard
regeneratorRuntime is not defined
Hello.
I get this error:
regeneratorRuntime is not defined
Here is the code: https://codesandbox.io/s/github/tiavina-mika/react-speech-recognition-issue
do:
npm i regenerator-runtime
then
import 'regenerator-runtime/runtime';
above the react-speech-recognition import
SHaiderX
thanks bro!
If you are using React make sure to add this [ import "regenerator-runtime/runtime"; ] at line 1 of " main.jsx" file OR If using Javascript add the above import statement at line 1 of " index.js" file OR If using Typescript add the above import statement at line 1 of " index.tsx" file
solution is not working for me using app router and putting the import in my root component
You should share your code @josh3io and @vipulghadi
i am facing same problem
@vipulghadi import it just above where you import react-speech-recognition
"use client"
import 'regenerator-runtime/runtime';
import SpeechRecognition, { useSpeechRecognition } from 'react-speech-recognition';