-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module parse failed #17
Comments
@tjiang11 it might have something to do with the source code of this library not being compiled to ES5 |
I'm not sure how to do the compiling thing but I fixed this by rewriting all functions to this form
I also had to import both the VoicePlayer and VoiceRecognition in order to use either of them.
|
@tjiang11 I had the same problem, i resolved it by adding the it's referenced here webpack/webpack#2031
|
@sho13 Would it be possible for me to see your whole config file? |
Copy VoiceRecognition.js, VoicePlayer.js in you src folder. And import them from there. You might have to add a loader in webpack file also (or rewriting all functions to this form |
I solved it by importing them with a loader directive:
|
I forked this module and fixed the ES5 incompatability by rewriting the functions in the same way as @thevaleriemack . I have made a pull request for the fixes, but in the meantime, you can fork my repo from here: https://github.com/bchang1213/react-voice-components |
@bchang1213 Your fix worked for me |
@jangidhitesh your fix worked for me, but I had to modify the code in VoicePlayer.js by removing references to the end method, which doesn't exist for speechsynthesis. |
@tjiang11 your fix worked for me. Thanks. |
Hi everyone, I'm having trouble importing VoicePlayer into my project. Anyone know what the problem is? This is the error I get.
I'm trying to get this to work in a project made with create-react-app
error repro: https://github.com/tjiang11/react-bug-repro
The text was updated successfully, but these errors were encountered: