Reputation: 4289
I have an angular2 client which is a Visual Studio vNext (ASP.Net 5) project. I am trying to create a build in Visual Studio Team Services, and I am getting errors like this on the build step:
Cannot find module 'angular2/core'
This is usually a problem with the typescript compiler. I have tsconfig.json in the project but I am not sure if Team Services is using it.
I don't have a problem building locally in Visual Studio.
Any idea how I should handle this?
Upvotes: 2
Views: 1905
Reputation: 29976
You need to add a "npm" task to run "npm install" command in your build definition to install the npm packages before VS Build. Otherwise, the angular won't be installed during the build.
Remember to set the "Working Directory" to the project folder where the npm configuration file "package.json" is placed.
Upvotes: 5