Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module not found: Can't resolve 'react-table/react-table.css'

I have create the app using create-react-app. Then I installed the react-table package(using command npm install --save react-table). When I started my application I am getting Module not found: Can't resolve 'react-table/react-table.css' this error.

Any suggestion how to resolve this. Thanks in advance !

like image 643
ganesh phirke Avatar asked Mar 31 '20 17:03

ganesh phirke


People also ask

How do you fix module not found Cannot resolve in react?

To solve the "Module not found: Can't resolve" error in React, make sure to install the package from the error message if it's a third-party package, e.g. npm i somePackage . If you got the error when importing local files, correct your import path.

Why are my CSS files not working in react?

This error is generated because the compiler is only able to import files from the src folder. Here, the CSS file is saved outside the src folder, so the compiler failed to import it. To make this code work, you just have to save the CSS file inside the src folder.

How to solve the error 'module not found' in react-bootstrap?

To solve the error "Module not found: Error: Can't resolve 'react-bootstrap'", make sure to install the react-bootstrap package by opening your terminal in your project's root directory and running the command npm install react-bootstrap bootstrap and restart your dev server.

How to solve the error 'module not found'?

To solve the error "Module not found: Error: Can't resolve 'bootstrap/dist/css/bootstrap.min.css'", make sure to install the bootstrap package by opening your terminal in your project's root directory and running the command npm install bootstrap and restart your dev server.

Can we create custom CSS for react-table?

We can easily create custom css for react-table and there is a lot of examples online. The current version of react-table is 7. React table 6th version supports the cs, You should install react-table version-6.

How do I add react-bootstrap to my project?

Open your terminal in your project's root directory (where your package.json file is located) and run the following commands: The command will add the react-bootstrap package to the dependencies of your project. Make sure to restart your development server and your IDE if necessary.


1 Answers

You should install react-table version-6.

$ npm install react-table-6

and then import these,

import ReactTable from "react-table-6";  
import "react-table-6/react-table.css" 
like image 126
Sohel Sorowar Avatar answered Sep 20 '22 15:09

Sohel Sorowar