node_modules breaks build in Visual Studio

Viewed 1275

Working to add Angular (v4) to an existing ASP.NET MVC 4 application. One of the projects it has includes Selenium Web Driver which has a web.config file included.

node_modules\selenium-webdriver\lib\test\data\web.config

This folder is NOT included in the project but is in my web application folder

myapplication\node_modules
myapplication\Controllers
myapplication\Views
myapplication\web.config
etc...

The web.config in the selenium-webdriver folder causes the build to break with the following error:

It is an error to use a section registered as

allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Pretty common error and easily fixed when it is your own mistake, but since this is a library I'm using I don't have control over the file. So my question is a bit leveled based on my research:

  • Can I make the "test" folder of selenium-webdriver go somewhere else?
  • Should my node_modules folder not be at the root of my web application?
  • In general.. how do I fix this?
2 Answers
Related