0

I've just created an angular 2 project via angular-cli. Then I added Bootstrap v4 using command npm install bootstrap@4.0.0-beta.2 provided by Bootstrap official site.

Anyway, everything works except for the following error in console window :

Uncaught Error: Bootstrap dropdown require Popper.js (https://popper.js.org)
    at scripts.bundle.js:179
    at scripts.bundle.js:588

I've installed popper.js and added inside .angular-cli.json :

  "scripts": [
    "../node_modules/jquery/dist/jquery.slim.min.js",
    "../node_modules/tether/dist/js/tether.min.js", 
    "../node_modules/popper.js/dist/umd/popper.js",              
    "../node_modules/bootstrap/dist/js/bootstrap.min.js"
  ],

But still the error is there!

Hooman Limouee
  • 1,143
  • 2
  • 21
  • 43

2 Answers2

1

I've almost solved the problem using package npm install ngx-bootstrap --save.

Of course it's not the direct way, Nevertheless it works properly.

Hooman Limouee
  • 1,143
  • 2
  • 21
  • 43
0

I had the same error.

Try running:

npm install --save bootstrap@4.0.0-alpha.6

kbariotis
  • 783
  • 1
  • 12
  • 25