4

I wanted to use React Bootstrap Table in my project and I'm getting the following error.

Uncaught ReferenceError: arguments is not defined at Object../node_modules/react-bootstrap-table2-toolkit/lib/src/search/SearchBar.js

here is the following import which are referred from their official website.

import ToolkitProvider, {Search} from 'react-bootstrap-table2-toolkit';

const {SearchBar} = Search;

where search can not be found from this import.

2 Answers 2

14

Here is an easy fix, I resolved this issue by changing the import

from

import ToolkitProvider, {Search} from 'react-bootstrap-table2-toolkit';

to

import ToolkitProvider, {Search} from 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit';
Sign up to request clarification or add additional context in comments.

1 Comment

nailed it mrrowley, do you know why the normal import doesnt work
0

The fix isnt still in place; change your import pointing to the .min file of toolkit

replace this

import ToolkitProvider, { CSVExport } from "react-bootstrap-table2-toolkit";

with this

import ToolkitProvider , { CSVExport } from 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.