yash patel

yash patel

  • 1.5k
  • 283
  • 21k

Getting error in importing css files

Nov 3 2020 12:46 AM
I m trying to import css files in react project
 
I created the project by create-react-app command
 
i have placed the different css files like bootstart.css,index .css and some more in the src directory itself 
 
But still i m getting error when importing this files 
 
I m getting this error
 
Module not found: Can't resolve 'index.css' in 'C:\Users\Yesh Depani\Desktop\nsroute\src' 
 
Here is my code of import
  1. import React from "react";  
  2. import ReactDOM from "react-dom";  
  3. import { BrowserRouter } from "react-router-dom";  
  4. import "index.css";  
  5. //import "atlantis.css";  
  6. //import "bootstrap.css";   
  7. //import "bootstrap.min.css";  
  8. import App from "./App";  
  9. //import * as serviceWorker from "./serviceWorker";  
  10.   
  11. ReactDOM.render(  
  12. <BrowserRouter>  
  13. <App />  
  14. </BrowserRouter>,  
  15. document.getElementById("root")  
  16. );

Answers (3)