Skip to content

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

Description

@Jatapiaro

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>
        );
    }

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions