0

Everyone I was trying to build a tic Tac toe game, but in my project I am getting this error I do not know how to solve it, can somebody help why it is showing like this (Please check attached image)

import logo from './logo.svg';
import './App.css';
import Icon from "./components/icon"
import { icons } from 'react-icons';
import { ToastContainer, toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import {Card,CardBody,Container,Button,Col,Row } from "reactstrap";
import 'bootstrap/dist/css/bootstrap.css';

const itemArray = new Array(9).fill("empty")
function App() {
  return (
    <div className="App">
      <header className="App-header">
        <p>
          Edit <code>src/App.js</code> and save to reload.
        </p>
        <Icon name="circle"/>
        <a
          className="App-link"
          href="https://reactjs.org"
          target="_blank"
          rel="noopener noreferrer"
        >
          Learn React
        </a>
      </header>
    </div>
  );
}

export default App;

enter image description here

5
  • try to add ./ before boostrap Commented Jun 24, 2021 at 9:01
  • i guess bootstrap is a dep and installed, correct? Commented Jun 24, 2021 at 9:04
  • have you installed bootstrap separately ? Commented Jun 24, 2021 at 9:06
  • Yes I have installed bootstrap using "npm install reactstrap" Commented Jun 24, 2021 at 9:24
  • 1
    @NiteshSingh - In the title and comments of your recent typo question, you asked how to make a property read-only. FWIW, here's how: pastebin.com/6CeAEgnk Happy coding! Commented Mar 16, 2022 at 9:30

3 Answers 3

1

Sounds like NodeJS detected that your module is not installed. Use npm install bootstrap and check how to import correctly the module. Follow the bootstrap website: https://getbootstrap.com/docs/5.0/getting-started/download/

If it is still not working, just use the CDN. It's lightweight and easy to implement.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes , Thank you so much I have downloaded it from the given link and it is also working fine now.
1

The same directory is wrong can you try this: '~bootstrap/dist/css/bootstrap.css'

Comments

0

Seems like you have installed bootstrap in a wrong way. I suggest to check if there is actually bootstrap module in node_module folder.

If it does not work, this seems to be old fashioned way but still a worthy try. Just include bootstrap.css file in public/index.html file. I mean in the <head> tag.

1 Comment

Thank you so much , I checked node_module folder bootstrap was not there so I reinstalled it and now it is working

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.