jQuery 3.5.0 and Bootstrap 4.4 Issues

Uncaught TypeError: Cannot convert object to primitive value(zone-evergreen.js:171)

If you are trying to use jQuery 3.5.0 and Bootstrap 4.4, you will come across an error something like this:

Can't convert object to primitive value(zone-evergreen:171).


Uncaught Type Error: Cannot convert object to primitive value(zone-evergreen.js:171 )
    at RegExp.test (<anonymous>)
    at HTMLDivElement.<anonymous> (bootstrap.bundle.min.js:6)
    at Function.each (jquery.min.js:2)
    at S.fn.init.each (jquery.min.js:2)
    at S.fn.init.a._jQueryInterface [as collapse] (bootstrap.bundle.min.js:6)
    at HTMLDivElement.<anonymous> (bootstrap.bundle.min.js:6)
    at Function.each (jquery.min.js:2)
    at S.fn.init.each (jquery.min.js:2)
    at HTMLButtonElement.<anonymous> (bootstrap.bundle.min.js:6)
    at HTMLDocument.dispatch (jquery.min.js:2)Code language: HTML, XML (xml)

This happened to me when I was trying to use the latest Bootstrap with jQuery in my Angular project.

The best solution that I could do was to use an earlier version of jQuery.

To do this, use the npm command:

npm install --save jquery@3.4.1Code language: CSS (css)

Leave a Reply

Discover more from BHUTAN IO

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top