I wanted to be exporting the table to excel in react so Installed react-export-table-to-excel.
However when I import through import { DownloadTableExcel } from 'react-export-table-to-excel';
it is giving me the above error I tried installing it globally but it's not working as well/. What can be the problem?
Below is react-export-table-to-excel in node modules
package.json
{
"name": "react app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@coreui/coreui": "^4.1.6",
"@coreui/react": "^4.2.3",
"@date-io/date-fns": "^2.14.0",
"@date-io/dayjs": "^2.14.0",
"@date-io/luxon": "^2.14.0",
"@date-io/moment": "^2.14.0",
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@mui/x-data-grid": "^5.12.3",
"@mui/x-date-pickers": "^5.0.0-alpha.7",
"@mui/x-date-pickers-pro": "^5.0.0-alpha.7",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"autoprefixer": "10.4.5",
"axios": "^0.27.2",
"bootstrap": "^5.1.3",
"date-fns": "^2.28.0",
"react": "^18.2.0",
"react-bootstrap": "^2.4.0",
"react-bootstrap-sweetalert": "^5.2.0",
"react-date-range": "^1.4.0",
"react-dom": "^18.2.0",
"react-export-table-to-excel": "^1.0.3",
"react-icons": "^4.4.0",
"react-redux": "^8.0.2",
"react-scripts": "5.0.1",
"rsuite": "^5.15.1",
"web-vitals": "^2.1.4",
"xlsx": "^0.18.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}