Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap, Popper is missing even after importing bootstrap bundle

I'm struggling with bootstrap4. I've imported the bootstrap.bundle.js which already contain popper.js.

But anyway I get the following error:

Uncaught ReferenceError: Popper is not defined

Including structure

<script type="text/javascript" src=".../js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src=".../js/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src=".../js/bootstrap.min.js"></script>
like image 205
Andriy Klitsuk Avatar asked Dec 06 '17 11:12

Andriy Klitsuk


2 Answers

bootstrap.bundle.js or bootstrap.bundle.min.js contains Bootstrap + Popper.js so you just have to include jQuery and Bootstrap Bundle and everything is done

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>   
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.bundle.min.js" integrity="sha384-3ziFidFTgxJXHMDttyPJKDuTlmxJlwbSkojudK/CkRqKDOmeSbN6KLrGdrBQnT2n" crossorigin="anonymous"></script>
like image 105
Johann-S Avatar answered Nov 10 '22 09:11

Johann-S


Add popper.min.js to your file

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
like image 28
Znaneswar Avatar answered Nov 10 '22 10:11

Znaneswar