I started a ASP.NET Core 2.0 MVC web application.
I installed Bootstrap 4 beta. from bower
I installed popper.js from bower
When I run the app, I got an exception from bootstrap saying it needs popper.js but I just installed it and I see it clearly in the lib folder and when I inspect the bower.json file I see it listed.
{
"name": "asp.net",
"private": true,
"dependencies": {
"bootstrap": "v4.0.0-beta",
"jquery": "3.2.1",
"jquery-validation": "1.17.0",
"jquery-validation-unobtrusive": "3.2.6",
"popper.js": "v1.12.5"
},
"resolutions": {
"bootstrap": "v4.0.0-beta",
"jquery": "3.2.1",
"jquery-validation": "1.17.0"
}
}
I don't know how the solution knows where to pick it but there's definitely something wrong with the installation for this kind of solution.
Unhandled exception at line 1414, column 5 in http://localhost:53499/lib/bootstrap/dist/js/bootstrap.js
0x800a139e - JavaScript runtime error: Bootstrap dropdown require Popper.js (https://popper.js.org) occurred
With 3.3.7 it works
So I uninstalled bootstrap 4 beta and installed bootstrap 3.3.7 and now it works
Go figure
Popper.js should be included before Bootstrap in your HTML
Do you mean I have to do something manually ? I thought starting a new project and installing the bootstrap from Bower or Nuget should be sufficient. I don't mind doing it manually but why installing things in a solution via package managers like Nuget or Bower aren't installing in a way that we don't have to do things manually ?
It doesn't explain why it works when using 3.3.7 but using 4.0.0 beta isn't working.
I remind you that I'm using ASP.NET CORE 2.0 in a new fresh project MVC Web Application and despite bootstrap already installed, when I upgrade to 4.0.0, it complains about drop-down that needs popper.js however I've looked everywhere and popper.js is there, it is listed in the bower.json file but I don't yet understand the structure of ASP.NET Core 2.0 projects because I don't see how and where it gets the reference to popper.js from bootstrap 4.0.0 Probably in the installation of bootstrap itself it knows where to go but for bootstrap 4.0.0 it looks like it's broken.
Sorry but I don't use ASP.NET so I cannot help you with that, I can just give you general advice which (I hope) can help you.
Package managers helps you on how to get libs you need for your project but that's your job to know how to use those libs :+1:
No problem. I will just assume that bootstrap and popper teams are not prepared. I can understand as well.
Maybe @FezVrasta will be able to help you :+1:
In fact I don't need help as 3.3.7 works. I just wanted to point that bootstrap 4.0.0 beta doesn't install popper.js correctly in an ASP.NET Core 2.0 MVC Application using Visual Studio 2017 on a windows 10 PC
Here's how to reproduce
Start visual Studio 2017
Create a new ASP.NET Core 2 MVC Web Application
Right click the project and Manage bower packages
Update Bootstrap to 4.0.0 beta
and if you want update all others like jquery etc. in Update availables
run the app
here's the message :

Hope this helps
That's true we had that bug in Bootstrap :+1:
but fixed by this PR : https://github.com/twbs/bootstrap/pull/23338
and everything will be fine in our next release (beta 2), which I hope will be here soon :smile:
Perfect 馃憤
if everything is good on your end, I think you can close this issue
i had used
Most helpful comment
Popper.js should be included before Bootstrap in your HTML