Open tiavina-mika opened 8 months ago
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';
@hinn254 's remark here was very helpful. I added the import, and my component is consumed by a client side component, but adding "use client" and the import for the regenerator-runtime in the Dictaphone component directly resolved it for me.
@hinn254 's remark here was very helpful. I added the import, and my component is consumed by a client side component, but adding "use client" and the import for the regenerator-runtime in the Dictaphone component directly resolved it for me.
glad it helped
Hello.
I get this error:
regeneratorRuntime
is not definedHere is the code: https://codesandbox.io/s/github/tiavina-mika/react-speech-recognition-issue