If you are a web developer, it’s given that you also write JavaScript code.
I am building an ASP.NET Core app in VS 2017 and I needed to install a feature that I chose to write in JavaScript. While everything worked fine initially, however, when I stopped the app and re-ran it, I got a nasty error. See image below:

I decided to shut down Visual Studio, launched it and open my project, but still in vain.
Turned out that in Tools => Option => Debugging => General, there is an item (circled in red) i.e. Enable JavaScript debugging for ASP.NET (Chrome, Edge and IE).

After unchecking this item and running the app, everything appeared just fine.

I certainly don’t recommend this to be a solution, but rather a workaround. Meanwhile, you can use developer tools in your favorite browser and continue debugging. Alternatively, you can also launch Visual Studio 2017 and select “Run as administrator.”