JamesBrill / react-speech-recognition

💬Speech recognition for your React app
https://webspeechrecognition.com/
MIT License
637 stars 116 forks source link

Uncaught ReferenceError: regeneratorRuntime is not defined #176

Closed mutasim77 closed 1 year ago

mutasim77 commented 1 year ago

Hey there! I started working on a 'basic example' and encountered an error.

Screen Shot 2023-06-03 at 4 45 47 PM

I'm using a React app and have already installed the regenerator-runtime package by running the command npm i --save regenerator-runtime. However, I'm still encountering an error. Has anyone else encountered this issue or know how to resolve it? Any assistance would be greatly appreciated.

zetorama commented 1 year ago

Have you imported the package somewhere? You could find your entry point (usually index.js) and just add this line:

import 'regenerator-runtime/runtime'

Also make sure to check out Troubleshooting section in README.md as this question was covered there.

sebastienbarre commented 1 year ago

Regenerator seems pretty huge as a dependency. Is there any way to avoid it? @JamesBrill ? Thanks