Ошибка сборки модуля: Ошибка: ENOENT: такого файла или каталога нет - Реагировать - PullRequest
0 голосов
/ 07 января 2019

Я пытаюсь реализовать нумерацию страниц в своем приложении реакции. Это сайт, за которым я слежу React Pagination Component . Но я получаю следующую ошибку при сборке приложения.

./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js Сбой сборки модуля: Ошибка: ENOENT: такого файла или каталога нет, откройте '/ Users / siddharthsinha / WebstormProjects / tweelyze-ui / node_modules / babel-preset-реакции-app / node_modules / @ babel / runtime / helpers / esm / assertThisInitialized. JS'

Поскольку я новичок в реакции, я не могу понять, что не так с моей реализацией. Вот файл js, в котором я реализовал нумерацию страниц.

import React from 'react';
import NavigationBar from './NavigationBar';
import SearchPageResultsStyle from "../assets/css/SearchResultsPage.css"
import JwPagination from 'jw-react-pagination';
import Homepage from "./Homepage";
import SearchBarComponent from "./SearchBarComponent"
import MuiThemeProvider from "material-ui/styles/MuiThemeProvider";

class SearchResultsPage  extends React.Component{
    constructor(props) {
        super(props);
        console.log("Printing in the results component")
        console.log(this.props.location.state)
        this.state = {
            results: this.props.location.state.results,
            keyword: this.props.location.state.keyword,
            pageOfItems: []
        };
        this.onChangePage = this.onChangePage.bind(this);
    }

    onChangePage(pageOfItems) {
        // update local state with new page of items
        this.setState({pageOfItems});
    }
    render() {
        return(
            <div>
                <NavigationBar/>
                <h4 style={{textAlign:'center', color:'#1a0dab'}}>Showing search results for <span style={{fontWeight:'bold', fontStyle:'Italic'}}>'{this.state.data.keyword}'</span></h4>
                <hr/>
                <div className={'wrap'} style={SearchPageResultsStyle}>
                    <div className={'fleft'}>left column</div>
                    <div className={'fcenter'}>
                        <h3 style={{color:'#1a0dab'}}>Tweeter tweets text will be displayed here!!!</h3>
                        <a href={'https://google.com'}>Tweet urls will be displayed here</a>
                        <br/>
                        <div style={{display:'inline'}}>
                            <p><span style={{fontWeight:'bold', textColor:'#6a6a6a'}}>topic: </span>crime</p>
                            <p><span style={{fontWeight:'bold', textColor:'#6a6a6a'}}>city: </span>delhi</p>
                            <p><span style={{fontWeight:'bold', textColor:'#6a6a6a'}}>lang: </span>Hindi</p>
                            <p><span style={{fontWeight:'bold', textColor:'#6a6a6a'}}>Hashtags: </span></p>
                            <hr/>
                            <JwPagination items={this.state.results} onChangePage={this.onChangePage}/>
                        </div>
                    </div>
                    <div className={'fright'}>right column</div>
                </div>
            </div>


        )
    }

}

export default SearchResultsPage;
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...