Skip to content
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

How this is supossed to be imported? I'm getting errors with webpack #13

Open
Jatapiaro opened this issue Jan 27, 2019 · 0 comments
Open

Comments

@Jatapiaro
Copy link

I'm getting the following errors:

react-speech.js?49ba:562 Uncaught TypeError: Cannot read property 'object' of undefined
    at Object.eval (react-speech.js?49ba:562)
    at __webpack_require__ (react-speech.js?49ba:30)
    at Object.eval (react-speech.js?49ba:60)
    at __webpack_require__ (react-speech.js?49ba:30)
    at eval (react-speech.js?49ba:50)
    at eval (react-speech.js?49ba:53)
    at webpackUniversalModuleDefinition (react-speech.js?49ba:3)
    at eval (react-speech.js?49ba:10)
    at Object.<anonymous> (bundle.js:1)
    at c (bundle.js:1)

And this is my code:

import React from 'react';
import HttpService from '../services/HttpService';
import WikipediaService from '../services/WikipediaService';
import Speech from 'react-speech';

export default class Wrapper extends React.Component {

    constructor(props) {
        super(props);
        this.httpService = new HttpService();
        this.wikipediaService = new WikipediaService(this.httpService);
    }

    componentDidMount() {
        this.wikipediaService.makeSearch()
            .then((res) => {
                console.log(res, 1);
            })
            .catch((err) => {
                console.log(err);
            });
    }

    render() {
        return (
            <div>
                <h1>This is the wrapper</h1>
                <Speech text="Welcome to react speech" />
            </div>
        );
    }

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant