I use NPM to maintain front-end dependencies in my MVC 5 web project. One of the key uses I have for NPM is to get Typescript definitions for things.
The project is organised like this:
MySolution
|
|-- MySolution.Web
|
|-- Controllers
|-- node_modules
|-- Views
|-- (etc...)
What I want to know is if I should be including "node_modules" into the project, and if I should be including "node_modules" into source control.
The reason I ask is that everything seems happy with it being excluded (even the build agent, which does a "NPM restore" before compiling).
However, NCrunch is complaining that it can't find any reference to various types which my project's TypeScript files make reference to.
E.g. Admin.ts makes reference to "/node_modules/@types/knockout/index.d.ts"
I think that bringing in "node_modules" into the web project would fix it, but I'm not sure if it's right.