0

In index.html, I have these included

  <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

The code responsible for the error is the following forward button:

<div className="btn-group float-right" role="group" aria-label="Button group">
                  <div className="dropdown">
                    <button className="btn btn-success dropdown-toggle" type="button" id={`forwardDropdown-${issue.issueId}`} data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                      Forward
                    </button>
                    <div className="dropdown-menu" aria-labelledby={`forwardDropdown-${issue.issueId}`}>
                      <a className="dropdown-item" href="#">Action</a>
                      <a className="dropdown-item" href="#">Another action</a>
                      <a className="dropdown-item" href="#">Something else here</a>
                    </div>
                  </div>
                  <button type='button' className="btn btn-danger">Discard</button>
                </div>

The error I get is

Uncaught TypeError: n is not a constructor
    at i.show (dropdown.js:175:22)
    at i.toggle (dropdown.js:126:10)
    at HTMLButtonElement.<anonymous> (dropdown.js:363:14)
    at Function.each (jquery-3.5.1.slim.min.js:2:3182)
    at E.fn.init.each (jquery-3.5.1.slim.min.js:2:1660)
    at t._jQueryInterface [as dropdown] (dropdown.js:350:17)
    at HTMLButtonElement.<anonymous> (dropdown.js:515:31)
    at HTMLDocument.dispatch (jquery-3.5.1.slim.min.js:2:42868)
    at v.handle (jquery-3.5.1.slim.min.js:2:40852)

The error shown on the screen by react is as follows

Script error.
    at handleError (http://localhost:3000/static/js/bundle.js:50096:58)
    at http://localhost:3000/static/js/bundle.js:50115:7
5
  • Are you using react? If not, change className to class. If so, add the proper tags
    – j08691
    Commented Mar 28 at 17:36
  • Yes I am using react Commented Mar 28 at 17:40
  • What is dropdown.js? That's where the error is happening.
    – Barmar
    Commented Mar 28 at 19:36
  • It is just dropdown from bootstrap 4.5.2, there is no file called dropdown.js in my whole project Commented Mar 29 at 1:51
  • Please tell me as I deduced reactjs might be responsible for the conflicts, how can I be sure of that and remove those conflicts Commented Mar 29 at 18:18

0